Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 929243004: adding preabandon flag to DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback incorporated Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index edbb82e167f248c65099a9255c67c3ce32c5f632..fb5fa7cc7a5f25004fbed7c69815a16ab300edff 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1494,6 +1494,9 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
GrTexture* texture;
// draw sprite uses the default texture params
AutoBitmapTexture abt(fContext, bitmap, NULL, &texture);
+ if (!texture) {
+ return;
+ }
SkImageFilter* filter = paint.getImageFilter();
// This bitmap will own the filtered result as a texture.
@@ -1882,8 +1885,9 @@ SkBaseDevice* SkGpuDevice::onCreateCompatibleDevice(const CreateInfo& cinfo) {
SkSurfaceProps props(fSurfaceProps.flags(), cinfo.fPixelGeometry);
return SkGpuDevice::Create(texture->asRenderTarget(), &props, flags);
} else {
- SkDebugf("---- failed to create compatible device texture [%d %d]\n",
- cinfo.fInfo.width(), cinfo.fInfo.height());
+ SkErrorInternals::SetError( kInternalError_SkError,
+ "---- failed to create compatible device texture [%d %d]\n",
+ cinfo.fInfo.width(), cinfo.fInfo.height());
return NULL;
}
}
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698