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

Side by Side Diff: gm/mixedxfermodes.cpp

Issue 21669004: Support multiple PDF rendering backends in the GM (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Eliminate warnings/errors on empty PDF rasterizer list Created 7 years, 4 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/gmmain.cpp ('k') | gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt » ('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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 p.setXfermodeMode(mode); 118 p.setXfermodeMode(mode);
119 canvas->save(); 119 canvas->save();
120 canvas->translate(dx, dy); 120 canvas->translate(dx, dy);
121 canvas->scale(s, s); 121 canvas->scale(s, s);
122 canvas->rotate(r); 122 canvas->rotate(r);
123 this->drawShape(canvas, p, &random); 123 this->drawShape(canvas, p, &random);
124 canvas->restore(); 124 canvas->restore();
125 } 125 }
126 } 126 }
127 127
128 virtual uint32_t onGetFlags() const {
129 // Skip PDF rasterization since rendering this PDF takes forever.
130 return kSkipPDFRasterization_Flag;
131 }
132
128 private: 133 private:
129 enum { 134 enum {
130 kNumShapes = 100, 135 kNumShapes = 100,
131 }; 136 };
132 SkAutoTUnref<SkShader> fBG; 137 SkAutoTUnref<SkShader> fBG;
133 SkPath fConcavePath; 138 SkPath fConcavePath;
134 SkPath fConvexPath; 139 SkPath fConvexPath;
135 typedef GM INHERITED; 140 typedef GM INHERITED;
136 }; 141 };
137 142
138 ////////////////////////////////////////////////////////////////////////////// 143 //////////////////////////////////////////////////////////////////////////////
139 144
140 static GM* MyFactory(void*) { return new MixedXfermodesGM; } 145 static GM* MyFactory(void*) { return new MixedXfermodesGM; }
141 static GMRegistry reg(MyFactory); 146 static GMRegistry reg(MyFactory);
142 147
143 } 148 }
OLDNEW
« no previous file with comments | « gm/gmmain.cpp ('k') | gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698