aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-06-23 14:38:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-23 14:38:48 -0700
commit74f681dce2fbadd481596aea15afb3e0fb36ceff (patch)
tree86093c4896eeddbbc33283288fbebb21996fce13 /tools
parent5fbb623099a6d0e0e72e7e230e75014fd64ae240 (diff)
Make SkGpuDevice know its alpha type
Make SkImage_Gpu snapshots opaque if surface is opaque. BUG=skia:3965 Review URL: https://codereview.chromium.org/1205643002
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureRenderer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 270b61fd28..34b08f567c 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -159,7 +159,9 @@ SkCanvas* PictureRenderer::setupCanvas(int width, int height) {
uint32_t flags = fUseDFText ? SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0;
SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(target->asRenderTarget(), &props));
+ SkAutoTUnref<SkGpuDevice> device(
+ SkGpuDevice::Create(target->asRenderTarget(), &props,
+ SkGpuDevice::kUninit_InitContents));
if (!device) {
return NULL;
}