diff options
author | Scott Lobdell <slobdell@google.com> | 2021-07-27 17:02:32 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-07-27 17:02:32 +0000 |
commit | cb84bc77bfeb89a940d8439f7458fe5d9bef7bef (patch) | |
tree | d6e70908803e918eb485e058341ce55d0a957188 /libs/hwui/pipeline/skia/SkiaPipeline.cpp | |
parent | dc5ea9d31ab76ba378da9c550813e6b7d8be1e69 (diff) | |
parent | 6aa393b52cd7362100a2b3e9b0b1dece473cf6dd (diff) |
Merge SP1A.210723.002
Change-Id: I220cdfc5cb9db40162fd33f400a54591018d54cf
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaPipeline.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaPipeline.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp index 44a6e4354608..4e7471d5d888 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp @@ -207,12 +207,16 @@ bool SkiaPipeline::createOrUpdateLayer(RenderNode* node, const DamageAccumulator void SkiaPipeline::prepareToDraw(const RenderThread& thread, Bitmap* bitmap) { GrDirectContext* context = thread.getGrContext(); - if (context) { + if (context && !bitmap->isHardware()) { ATRACE_FORMAT("Bitmap#prepareToDraw %dx%d", bitmap->width(), bitmap->height()); auto image = bitmap->makeImage(); - if (image.get() && !bitmap->isHardware()) { + if (image.get()) { SkImage_pinAsTexture(image.get(), context); SkImage_unpinAsTexture(image.get(), context); + // A submit is necessary as there may not be a frame coming soon, so without a call + // to submit these texture uploads can just sit in the queue building up until + // we run out of RAM + context->flushAndSubmit(); } } } |