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

Unified Diff: include/core/SkDevice.h

Issue 720213002: Rename onCreateDevice -> onCreateCompatibleDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « include/core/SkBitmapDevice.h ('k') | include/device/xps/SkXPSDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDevice.h
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 4a61321ff76203b2e2264de518d6bd1cadefa753..95a6600b636a067c3d769970ab4e2ab7b7c27170 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -236,7 +236,7 @@ protected:
virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint);
/** The SkDevice passed will be an SkDevice which was returned by a call to
- onCreateDevice on this device with kSaveLayer_Usage.
+ onCreateCompatibleDevice on this device with kSaveLayer_Usage.
*/
virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
const SkPaint&) = 0;
@@ -340,6 +340,16 @@ protected:
void setPixelGeometry(SkPixelGeometry geo);
+ struct CreateInfo {
+ CreateInfo(const SkImageInfo& info, Usage usage) : fInfo(info), fUsage(usage) {}
+
+ SkImageInfo fInfo;
+ Usage fUsage;
+ };
+ virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& cinfo) {
+ return NULL;
+ }
+
private:
friend class SkCanvas;
friend struct DeviceCM; //for setMatrixClip
@@ -366,10 +376,6 @@ private:
// just called by SkCanvas for imagefilter
SkBaseDevice* createCompatibleDeviceForImageFilter(const SkImageInfo&);
- virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) {
- return NULL;
- }
-
/** Causes any deferred drawing to the device to be completed.
*/
virtual void flush() {}
« no previous file with comments | « include/core/SkBitmapDevice.h ('k') | include/device/xps/SkXPSDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698