aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-05-05 12:38:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-05 12:38:03 -0700
commit4e30f27164179d344f0c8efa9a691d1bc9a53e3f (patch)
tree58fb39670a3cc7c561d367918b614ac1342cd574 /src/gpu/SkGpuDevice.cpp
parenta8d0d6c8bad00e713bc33e5f0d47ca4fec104433 (diff)
Disable layer hoisting for non-8888 canvases
This just stops the bleeding. A real fix would propagate the canvas' backing type down to the layer hoister. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957433002 Review-Url: https://codereview.chromium.org/1957433002
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r--src/gpu/SkGpuDevice.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 54ed413549..6992a45dab 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1784,7 +1784,9 @@ bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
ASSERT_SINGLE_OWNER
#ifndef SK_IGNORE_GPU_LAYER_HOISTING
// todo: should handle this natively
- if (paint) {
+ if (paint ||
+ (kRGBA_8888_SkColorType != mainCanvas->imageInfo().colorType() &&
+ kBGRA_8888_SkColorType != mainCanvas->imageInfo().colorType())) {
return false;
}