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

Side by Side Diff: gm/vertices.cpp

Issue 256373002: Turn on quilt mode in DM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « gm/twopointradial.cpp ('k') | gm/verttext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 19 matching lines...) Expand all
30 30
31 public: 31 public:
32 VerticesGM() : fShader(NULL) { 32 VerticesGM() : fShader(NULL) {
33 } 33 }
34 34
35 virtual ~VerticesGM() { 35 virtual ~VerticesGM() {
36 SkSafeUnref(fShader); 36 SkSafeUnref(fShader);
37 } 37 }
38 38
39 protected: 39 protected:
40 virtual uint32_t onGetFlags() const SK_OVERRIDE {
41 return kSkipTiled_Flag;
42 }
43
40 virtual void onOnceBeforeDraw() SK_OVERRIDE { 44 virtual void onOnceBeforeDraw() SK_OVERRIDE {
41 const SkScalar X = 150; 45 const SkScalar X = 150;
42 const SkScalar Y = 150; 46 const SkScalar Y = 150;
43 47
44 fPts[0].set(0, 0); fPts[1].set(X/2, 10); fPts[2].set(X, 0); 48 fPts[0].set(0, 0); fPts[1].set(X/2, 10); fPts[2].set(X, 0);
45 fPts[3].set(10, Y/2); fPts[4].set(X/2, Y/2); fPts[5].set(X-10, Y/2); 49 fPts[3].set(10, Y/2); fPts[4].set(X/2, Y/2); fPts[5].set(X-10, Y/2);
46 fPts[6].set(0, Y); fPts[7].set(X/2, Y-10); fPts[8].set(X, Y); 50 fPts[6].set(0, Y); fPts[7].set(X/2, Y-10); fPts[8].set(X, Y);
47 51
48 const SkScalar w = 200; 52 const SkScalar w = 200;
49 const SkScalar h = 200; 53 const SkScalar h = 200;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 canvas->translate(0, 200); 112 canvas->translate(0, 200);
109 xfer->unref(); 113 xfer->unref();
110 } 114 }
111 } 115 }
112 116
113 private: 117 private:
114 typedef skiagm::GM INHERITED; 118 typedef skiagm::GM INHERITED;
115 }; 119 };
116 120
117 DEF_GM( return SkNEW(VerticesGM); ) 121 DEF_GM( return SkNEW(VerticesGM); )
OLDNEW
« no previous file with comments | « gm/twopointradial.cpp ('k') | gm/verttext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698