diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-11 05:58:58 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-11 05:58:58 +0000 |
commit | 0faac1e8579088a39f38d02ff675f14d7deb608d (patch) | |
tree | 4e4cdee1aa1af6b2012bc0aa7ab9ccdcd097dc56 /samplecode/SamplePolyToPoly.cpp | |
parent | c1c5b15e41eaae5edeb032d994a619ea05c3d0a5 (diff) |
remove some dead code in pipes
inherit from SampleView for more samples
add L key to toggle using SkGPipe
git-svn-id: http://skia.googlecode.com/svn/trunk@1296 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SamplePolyToPoly.cpp')
-rw-r--r-- | samplecode/SamplePolyToPoly.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/samplecode/SamplePolyToPoly.cpp b/samplecode/SamplePolyToPoly.cpp index ccfe430e42..29a47f7109 100644 --- a/samplecode/SamplePolyToPoly.cpp +++ b/samplecode/SamplePolyToPoly.cpp @@ -8,7 +8,7 @@ extern bool SkSetPoly3To3(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]); -class PolyToPolyView : public SkView { +class PolyToPolyView : public SampleView { public: PolyToPolyView() { // tests @@ -72,10 +72,6 @@ protected: return this->INHERITED::onQuery(evt); } - void drawBG(SkCanvas* canvas) { - canvas->drawColor(SK_ColorWHITE); - } - static void doDraw(SkCanvas* canvas, SkPaint* paint, const int isrc[], const int idst[], int count) { SkMatrix matrix; @@ -110,9 +106,7 @@ protected: canvas->restore(); } - virtual void onDraw(SkCanvas* canvas) { - this->drawBG(canvas); - + virtual void onDrawContent(SkCanvas* canvas) { SkPaint paint; paint.setAntiAlias(true); paint.setStrokeWidth(SkIntToScalar(4)); @@ -153,7 +147,7 @@ protected: } private: - typedef SkView INHERITED; + typedef SampleView INHERITED; }; ////////////////////////////////////////////////////////////////////////////// |