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

Side by Side Diff: gm/gm.cpp

Issue 23587029: gm: add a flag to force perspective usage in all gms (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add reset of matrix in GM constructor too Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « gm/gm.h ('k') | gm/gmmain.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 #include "gm.h" 8 #include "gm.h"
9 using namespace skiagm; 9 using namespace skiagm;
10 10
11 SkString GM::gResourcePath; 11 SkString GM::gResourcePath;
12 12
13 GM::GM() { 13 GM::GM() {
14 fBGColor = SK_ColorWHITE; 14 fBGColor = SK_ColorWHITE;
15 fCanvasIsDeferred = false; 15 fCanvasIsDeferred = false;
16 fHaveCalledOnceBeforeDraw = false; 16 fHaveCalledOnceBeforeDraw = false;
17 fIgnoreFailures = false; 17 fIgnoreFailures = false;
18 fStarterMatrix.reset();
18 } 19 }
19 GM::~GM() {} 20 GM::~GM() {}
20 21
21 void GM::draw(SkCanvas* canvas) { 22 void GM::draw(SkCanvas* canvas) {
22 this->drawBackground(canvas); 23 this->drawBackground(canvas);
23 this->drawContent(canvas); 24 this->drawContent(canvas);
24 } 25 }
25 26
26 void GM::drawContent(SkCanvas* canvas) { 27 void GM::drawContent(SkCanvas* canvas) {
27 if (!fHaveCalledOnceBeforeDraw) { 28 if (!fHaveCalledOnceBeforeDraw) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 GrRenderTarget* renderTarget = device->accessRenderTarget(); 72 GrRenderTarget* renderTarget = device->accessRenderTarget();
72 if (NULL != renderTarget) { 73 if (NULL != renderTarget) {
73 return renderTarget->getContext(); 74 return renderTarget->getContext();
74 } 75 }
75 return NULL; 76 return NULL;
76 } 77 }
77 #endif 78 #endif
78 79
79 // need to explicitly declare this, or we get some weird infinite loop llist 80 // need to explicitly declare this, or we get some weird infinite loop llist
80 template GMRegistry* SkTRegistry<GM*(*)(void*)>::gHead; 81 template GMRegistry* SkTRegistry<GM*(*)(void*)>::gHead;
OLDNEW
« no previous file with comments | « gm/gm.h ('k') | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698