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

Unified Diff: samplecode/SampleHT.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 | « samplecode/SampleArc.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleHT.cpp
diff --git a/samplecode/SampleHT.cpp b/samplecode/SampleHT.cpp
index 1436817e769e91a28f0b6a3d6d2753b1c58ebde3..33fb77105ec081f0c701f83ccdd337bde90fa2c1 100644
--- a/samplecode/SampleHT.cpp
+++ b/samplecode/SampleHT.cpp
@@ -9,7 +9,7 @@
#include "SkAnimTimer.h"
#include "SkView.h"
#include "SkCanvas.h"
-#include "SkCanvasDrawable.h"
+#include "SkDrawable.h"
#include "SkInterpolator.h"
#include "SkPictureRecorder.h"
#include "SkRandom.h"
@@ -43,7 +43,7 @@ static SkColor rand_opaque_color(uint32_t seed) {
return rand.nextU() | (0xFF << 24);
}
-class HTDrawable : public SkCanvasDrawable {
+class HTDrawable : public SkDrawable {
SkRect fR;
SkColor fColor;
SkInterpolator* fInterp;
@@ -127,7 +127,7 @@ public:
HTDrawable* fDrawable;
};
Rec fArray[N];
- SkAutoTUnref<SkCanvasDrawable> fRoot;
+ SkAutoTUnref<SkDrawable> fRoot;
SkMSec fTime;
HTView() {
@@ -137,10 +137,10 @@ public:
SkCanvas* canvas = recorder.beginRecording(SkRect::MakeWH(W, H));
for (int i = 0; i < N; ++i) {
fArray[i].fDrawable = new HTDrawable(rand);
- canvas->EXPERIMENTAL_drawDrawable(fArray[i].fDrawable);
+ canvas->drawDrawable(fArray[i].fDrawable);
fArray[i].fDrawable->unref();
}
- fRoot.reset(recorder.EXPERIMENTAL_endRecordingAsDrawable());
+ fRoot.reset(recorder.endRecordingAsDrawable());
}
protected:
@@ -153,7 +153,7 @@ protected:
}
void onDrawContent(SkCanvas* canvas) SK_OVERRIDE {
- canvas->EXPERIMENTAL_drawDrawable(fRoot);
+ canvas->drawDrawable(fRoot);
}
bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE {
« no previous file with comments | « samplecode/SampleArc.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698