diff options
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkImage_Gpu.cpp | 2 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index 973f4ba304..4003631c8a 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -61,7 +61,7 @@ bool SkImage_Gpu::getROPixels(SkBitmap* dst) const { } bool SkImage_Gpu::isOpaque() const { - return GrPixelConfigIsOpaque(fTexture->config()); + return GrPixelConfigIsOpaque(fTexture->config()) || fAlphaType == kOpaque_SkAlphaType; } static void apply_premul(const SkImageInfo& info, void* pixels, size_t rowBytes) { diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index cbc183eacf..fa006a61cd 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -83,7 +83,8 @@ void SkSurface_Gpu::onDiscard() { /////////////////////////////////////////////////////////////////////////////// SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, const SkSurfaceProps* props) { - SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(target, props)); + SkAutoTUnref<SkGpuDevice> device( + SkGpuDevice::Create(target, props, SkGpuDevice::kUninit_InitContents)); if (!device) { return NULL; } @@ -93,7 +94,7 @@ SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, const SkSurf SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, Budgeted budgeted, const SkImageInfo& info, int sampleCount, const SkSurfaceProps* props) { SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(ctx, budgeted, info, sampleCount, props, - SkGpuDevice::kNeedClear_Flag)); + SkGpuDevice::kClear_InitContents)); if (!device) { return NULL; } @@ -113,7 +114,8 @@ SkSurface* SkSurface::NewWrappedRenderTarget(GrContext* context, GrBackendTextur if (!surface) { return NULL; } - SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(surface->asRenderTarget(), props)); + SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(surface->asRenderTarget(), props, + SkGpuDevice::kUninit_InitContents)); if (!device) { return NULL; } |