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

Side by Side Diff: src/core/SkRecordDraw.cpp

Issue 340403003: SaveFlags be-gone (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: One more baseurl attempt Created 6 years, 5 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 | « src/core/SkPictureRecord.cpp ('k') | src/core/SkRecordOpts.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 2014 Google Inc. 2 * Copyright 2014 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 "SkRecordDraw.h" 8 #include "SkRecordDraw.h"
9 9
10 void SkRecordDraw(const SkRecord& record, SkCanvas* canvas, SkDrawPictureCallbac k* callback) { 10 void SkRecordDraw(const SkRecord& record, SkCanvas* canvas, SkDrawPictureCallbac k* callback) {
(...skipping 18 matching lines...) Expand all
29 29
30 bool Draw::skip(const BoundedDrawPosTextH& r) { 30 bool Draw::skip(const BoundedDrawPosTextH& r) {
31 return fCanvas->quickRejectY(r.minY, r.maxY); 31 return fCanvas->quickRejectY(r.minY, r.maxY);
32 } 32 }
33 33
34 // NoOps draw nothing. 34 // NoOps draw nothing.
35 template <> void Draw::draw(const NoOp&) {} 35 template <> void Draw::draw(const NoOp&) {}
36 36
37 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; } 37 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; }
38 DRAW(Restore, restore()); 38 DRAW(Restore, restore());
39 DRAW(Save, save(r.flags)); 39 DRAW(Save, save());
40 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags)); 40 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags));
41 DRAW(PopCull, popCull()); 41 DRAW(PopCull, popCull());
42 DRAW(PushCull, pushCull(r.rect)); 42 DRAW(PushCull, pushCull(r.rect));
43 DRAW(Clear, clear(r.color)); 43 DRAW(Clear, clear(r.color));
44 DRAW(Concat, concat(r.matrix)); 44 DRAW(Concat, concat(r.matrix));
45 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix))); 45 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix)));
46 46
47 DRAW(ClipPath, clipPath(r.path, r.op, r.doAA)); 47 DRAW(ClipPath, clipPath(r.path, r.op, r.doAA));
48 DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA)); 48 DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA));
49 DRAW(ClipRect, clipRect(r.rect, r.op, r.doAA)); 49 DRAW(ClipRect, clipRect(r.rect, r.op, r.doAA));
(...skipping 16 matching lines...) Expand all
66 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); 66 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint));
67 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa int)); 67 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa int));
68 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co lors, 68 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co lors,
69 r.xmode.get(), r.indices, r.indexCount, r.paint) ); 69 r.xmode.get(), r.indices, r.indexCount, r.paint) );
70 #undef DRAW 70 #undef DRAW
71 71
72 template <> void Draw::draw(const PairedPushCull& r) { this->draw(*r.base); } 72 template <> void Draw::draw(const PairedPushCull& r) { this->draw(*r.base); }
73 template <> void Draw::draw(const BoundedDrawPosTextH& r) { this->draw(*r.base); } 73 template <> void Draw::draw(const BoundedDrawPosTextH& r) { this->draw(*r.base); }
74 74
75 } // namespace SkRecords 75 } // namespace SkRecords
OLDNEW
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | src/core/SkRecordOpts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698