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

Unified Diff: src/core/SkDeviceImageFilterProxy.h

Issue 1116453002: onCreateDevice -> NULL now means the caller should create its own (bitmap) device (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 5 years, 8 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/core/SkCanvas.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDeviceImageFilterProxy.h
diff --git a/src/core/SkDeviceImageFilterProxy.h b/src/core/SkDeviceImageFilterProxy.h
index dcf12f7c4016d1564f92a9cd707c6ca68b3cabbe..79ff957564c48af5661dff3e3e5d0296499e2070 100644
--- a/src/core/SkDeviceImageFilterProxy.h
+++ b/src/core/SkDeviceImageFilterProxy.h
@@ -8,6 +8,7 @@
#ifndef SkDeviceImageFilterProxy_DEFINED
#define SkDeviceImageFilterProxy_DEFINED
+#include "SkBitmapDevice.h"
#include "SkDevice.h"
#include "SkImageFilter.h"
#include "SkSurfaceProps.h"
@@ -24,7 +25,11 @@ public:
SkBaseDevice::kNever_TileUsage,
kUnknown_SkPixelGeometry,
true /*forImageFilter*/);
- return fDevice->onCreateDevice(cinfo, NULL);
+ SkBaseDevice* dev = fDevice->onCreateDevice(cinfo, NULL);
+ if (NULL == dev) {
+ dev = SkBitmapDevice::Create(cinfo.fInfo);
+ }
+ return dev;
}
bool canHandleImageFilter(const SkImageFilter* filter) override {
return fDevice->canHandleImageFilter(filter);
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698