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

Unified Diff: src/core/SkDrawable.cpp

Issue 903993002: rename SkCanvasDrawable to SkDrawable, and make public (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add dox for drawDrawable 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/core/SkCanvasDrawable.cpp ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDrawable.cpp
diff --git a/src/core/SkCanvasDrawable.cpp b/src/core/SkDrawable.cpp
similarity index 80%
rename from src/core/SkCanvasDrawable.cpp
rename to src/core/SkDrawable.cpp
index 99a4996bc906190f7480bb14278185f688ebe095..64fefd2f1c6bba9a771c8882f071b9ad01f2c577 100644
--- a/src/core/SkCanvasDrawable.cpp
+++ b/src/core/SkDrawable.cpp
@@ -6,7 +6,7 @@
*/
#include "SkCanvas.h"
-#include "SkCanvasDrawable.h"
+#include "SkDrawable.h"
#include "SkThread.h"
static int32_t next_generation_id() {
@@ -21,7 +21,7 @@ static int32_t next_generation_id() {
return genID;
}
-SkCanvasDrawable::SkCanvasDrawable() : fGenerationID(0) {}
+SkDrawable::SkDrawable() : fGenerationID(0) {}
static void draw_bbox(SkCanvas* canvas, const SkRect& r) {
SkPaint paint;
@@ -32,7 +32,7 @@ static void draw_bbox(SkCanvas* canvas, const SkRect& r) {
canvas->drawLine(r.left(), r.bottom(), r.right(), r.top(), paint);
}
-void SkCanvasDrawable::draw(SkCanvas* canvas) {
+void SkDrawable::draw(SkCanvas* canvas) {
SkAutoCanvasRestore acr(canvas, true);
this->onDraw(canvas);
@@ -41,22 +41,22 @@ void SkCanvasDrawable::draw(SkCanvas* canvas) {
}
}
-SkPicture* SkCanvasDrawable::newPictureSnapshot() {
+SkPicture* SkDrawable::newPictureSnapshot() {
return this->onNewPictureSnapshot();
}
-uint32_t SkCanvasDrawable::getGenerationID() {
+uint32_t SkDrawable::getGenerationID() {
if (0 == fGenerationID) {
fGenerationID = next_generation_id();
}
return fGenerationID;
}
-SkRect SkCanvasDrawable::getBounds() {
+SkRect SkDrawable::getBounds() {
return this->onGetBounds();
}
-void SkCanvasDrawable::notifyDrawingChanged() {
+void SkDrawable::notifyDrawingChanged() {
fGenerationID = 0;
}
@@ -64,7 +64,7 @@ void SkCanvasDrawable::notifyDrawingChanged() {
#include "SkPictureRecorder.h"
-SkPicture* SkCanvasDrawable::onNewPictureSnapshot() {
+SkPicture* SkDrawable::onNewPictureSnapshot() {
SkPictureRecorder recorder;
const SkRect bounds = this->getBounds();
« no previous file with comments | « src/core/SkCanvasDrawable.cpp ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698