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

Side by Side Diff: gm/gm.h

Issue 869393007: Add standard way to indicate GM is GPU-only. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add include 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 unified diff | Download patch
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/gm.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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef skiagm_DEFINED 8 #ifndef skiagm_DEFINED
9 #define skiagm_DEFINED 9 #define skiagm_DEFINED
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void setCanvasIsDeferred(bool isDeferred) { 86 void setCanvasIsDeferred(bool isDeferred) {
87 fCanvasIsDeferred = isDeferred; 87 fCanvasIsDeferred = isDeferred;
88 } 88 }
89 89
90 const SkMatrix& getStarterMatrix() { return fStarterMatrix; } 90 const SkMatrix& getStarterMatrix() { return fStarterMatrix; }
91 void setStarterMatrix(const SkMatrix& matrix) { 91 void setStarterMatrix(const SkMatrix& matrix) {
92 fStarterMatrix = matrix; 92 fStarterMatrix = matrix;
93 } 93 }
94 94
95 protected: 95 protected:
96 /** draws a standard message that the GM is only intended to be used wit h the GPU.*/
97 void drawGpuOnlyMessage(SkCanvas*
98 );
96 virtual void onOnceBeforeDraw() {} 99 virtual void onOnceBeforeDraw() {}
97 virtual void onDraw(SkCanvas*) = 0; 100 virtual void onDraw(SkCanvas*) = 0;
98 virtual void onDrawBackground(SkCanvas*); 101 virtual void onDrawBackground(SkCanvas*);
99 virtual SkISize onISize() = 0; 102 virtual SkISize onISize() = 0;
100 virtual SkString onShortName() = 0; 103 virtual SkString onShortName() = 0;
101 104
102 virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); } 105 virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); }
103 106
104 private: 107 private:
105 Mode fMode; 108 Mode fMode;
(...skipping 17 matching lines...) Expand all
123 SkISize onISize() SK_OVERRIDE; 126 SkISize onISize() SK_OVERRIDE;
124 SkString onShortName() SK_OVERRIDE; 127 SkString onShortName() SK_OVERRIDE;
125 private: 128 private:
126 SkString fName; 129 SkString fName;
127 void (*fDrawProc)(SkCanvas*); 130 void (*fDrawProc)(SkCanvas*);
128 SkISize fSize; 131 SkISize fSize;
129 }; 132 };
130 } 133 }
131 134
132 #endif 135 #endif
OLDNEW
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/gm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698