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

Unified Diff: src/utils/SkPictureUtils.cpp

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updating to ToT (10994) Created 7 years, 4 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/utils/SkDeferredCanvas.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkPictureUtils.cpp
===================================================================
--- src/utils/SkPictureUtils.cpp (revision 10994)
+++ src/utils/SkPictureUtils.cpp (working copy)
@@ -5,13 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkPictureUtils.h"
+#include "SkBitmapDevice.h"
#include "SkCanvas.h"
#include "SkData.h"
-#include "SkDevice.h"
+#include "SkPictureUtils.h"
#include "SkPixelRef.h"
+#include "SkRRect.h"
#include "SkShader.h"
-#include "SkRRect.h"
class PixelRefSet {
public:
@@ -47,7 +47,7 @@
* It should never actually draw anything, so there need not be any pixels
* behind its device-bitmap.
*/
-class GatherPixelRefDevice : public SkDevice {
+class GatherPixelRefDevice : public SkBitmapDevice {
private:
PixelRefSet* fPRSet;
@@ -70,7 +70,7 @@
}
public:
- GatherPixelRefDevice(const SkBitmap& bm, PixelRefSet* prset) : SkDevice(bm) {
+ GatherPixelRefDevice(const SkBitmap& bm, PixelRefSet* prset) : SkBitmapDevice(bm) {
fPRSet = prset;
}
@@ -138,7 +138,7 @@
const SkPaint& paint) SK_OVERRIDE {
this->addBitmapFromPaint(paint);
}
- virtual void drawDevice(const SkDraw&, SkDevice*, int x, int y,
+ virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
const SkPaint&) SK_OVERRIDE {
nothing_to_do();
}
@@ -150,11 +150,14 @@
not_supported();
return false;
}
+
+private:
+ typedef SkBitmapDevice INHERITED;
};
class NoSaveLayerCanvas : public SkCanvas {
public:
- NoSaveLayerCanvas(SkDevice* device) : INHERITED(device) {}
+ NoSaveLayerCanvas(SkBaseDevice* device) : INHERITED(device) {}
// turn saveLayer() into save() for speed, should not affect correctness.
virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698