diff options
author | bsalomon <bsalomon@google.com> | 2015-06-23 14:38:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-23 14:38:48 -0700 |
commit | 74f681dce2fbadd481596aea15afb3e0fb36ceff (patch) | |
tree | 86093c4896eeddbbc33283288fbebb21996fce13 /tools | |
parent | 5fbb623099a6d0e0e72e7e230e75014fd64ae240 (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.cpp | 4 |
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; } |