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

Unified Diff: samplecode/SampleArc.cpp

Issue 898343004: Rename SkCanvasDrawable to SkDrawable, and make public (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gyp 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 | « include/core/SkPictureRecorder.h ('k') | samplecode/SampleHT.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleArc.cpp
diff --git a/samplecode/SampleArc.cpp b/samplecode/SampleArc.cpp
index 3775de50c826e6d328cc7b9a7a5f07416a4a7844..bc20e92cc326ab1d4a03c9c20dc0449c849e9a7b 100644
--- a/samplecode/SampleArc.cpp
+++ b/samplecode/SampleArc.cpp
@@ -9,6 +9,7 @@
#include "SkAnimTimer.h"
#include "SkView.h"
#include "SkCanvas.h"
+#include "SkDrawable.h"
#include "SkGradientShader.h"
#include "SkPath.h"
#include "SkRegion.h"
@@ -24,8 +25,6 @@
#include "SkColorFilter.h"
#include "SkLayerRasterizer.h"
-#include "SkCanvasDrawable.h"
-
#include "SkParsePath.h"
static void testparse() {
SkRect r;
@@ -40,7 +39,7 @@ static void testparse() {
}
class ArcsView : public SampleView {
- class MyDrawable : public SkCanvasDrawable {
+ class MyDrawable : public SkDrawable {
SkRect fR;
SkScalar fSweep;
public:
@@ -84,7 +83,7 @@ class ArcsView : public SampleView {
public:
SkRect fRect;
MyDrawable* fAnimatingDrawable;
- SkCanvasDrawable* fRootDrawable;
+ SkDrawable* fRootDrawable;
ArcsView() {
testparse();
@@ -97,7 +96,7 @@ public:
SkPictureRecorder recorder;
this->drawRoot(recorder.beginRecording(SkRect::MakeWH(800, 500)));
- fRootDrawable = recorder.EXPERIMENTAL_endRecordingAsDrawable();
+ fRootDrawable = recorder.endRecordingAsDrawable();
}
~ArcsView() SK_OVERRIDE {
@@ -190,13 +189,13 @@ protected:
DrawRectWithLines(canvas, fRect, paint);
- canvas->EXPERIMENTAL_drawDrawable(fAnimatingDrawable);
+ canvas->drawDrawable(fAnimatingDrawable);
DrawArcs(canvas);
}
void onDrawContent(SkCanvas* canvas) SK_OVERRIDE {
- canvas->EXPERIMENTAL_drawDrawable(fRootDrawable);
+ canvas->drawDrawable(fRootDrawable);
}
bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE {
« no previous file with comments | « include/core/SkPictureRecorder.h ('k') | samplecode/SampleHT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698