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

Unified Diff: samplecode/SampleArc.cpp

Issue 882853006: Revert of rename SkCanvasDrawable to SkDrawable, and make public (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 bc20e92cc326ab1d4a03c9c20dc0449c849e9a7b..3775de50c826e6d328cc7b9a7a5f07416a4a7844 100644
--- a/samplecode/SampleArc.cpp
+++ b/samplecode/SampleArc.cpp
@@ -9,7 +9,6 @@
#include "SkAnimTimer.h"
#include "SkView.h"
#include "SkCanvas.h"
-#include "SkDrawable.h"
#include "SkGradientShader.h"
#include "SkPath.h"
#include "SkRegion.h"
@@ -25,6 +24,8 @@
#include "SkColorFilter.h"
#include "SkLayerRasterizer.h"
+#include "SkCanvasDrawable.h"
+
#include "SkParsePath.h"
static void testparse() {
SkRect r;
@@ -39,7 +40,7 @@
}
class ArcsView : public SampleView {
- class MyDrawable : public SkDrawable {
+ class MyDrawable : public SkCanvasDrawable {
SkRect fR;
SkScalar fSweep;
public:
@@ -83,7 +84,7 @@
public:
SkRect fRect;
MyDrawable* fAnimatingDrawable;
- SkDrawable* fRootDrawable;
+ SkCanvasDrawable* fRootDrawable;
ArcsView() {
testparse();
@@ -96,7 +97,7 @@
SkPictureRecorder recorder;
this->drawRoot(recorder.beginRecording(SkRect::MakeWH(800, 500)));
- fRootDrawable = recorder.endRecordingAsDrawable();
+ fRootDrawable = recorder.EXPERIMENTAL_endRecordingAsDrawable();
}
~ArcsView() SK_OVERRIDE {
@@ -189,13 +190,13 @@
DrawRectWithLines(canvas, fRect, paint);
- canvas->drawDrawable(fAnimatingDrawable);
+ canvas->EXPERIMENTAL_drawDrawable(fAnimatingDrawable);
DrawArcs(canvas);
}
void onDrawContent(SkCanvas* canvas) SK_OVERRIDE {
- canvas->drawDrawable(fRootDrawable);
+ canvas->EXPERIMENTAL_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