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

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: Created 6 years, 6 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
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) { 10 void SkRecordDraw(const SkRecord& record, SkCanvas* canvas) {
(...skipping 14 matching lines...) Expand all
25 25
26 bool Draw::skip(const BoundedDrawPosTextH& r) { 26 bool Draw::skip(const BoundedDrawPosTextH& r) {
27 return fCanvas->quickRejectY(r.minY, r.maxY); 27 return fCanvas->quickRejectY(r.minY, r.maxY);
28 } 28 }
29 29
30 // NoOps draw nothing. 30 // NoOps draw nothing.
31 template <> void Draw::draw(const NoOp&) {} 31 template <> void Draw::draw(const NoOp&) {}
32 32
33 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; } 33 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; }
34 DRAW(Restore, restore()); 34 DRAW(Restore, restore());
35 DRAW(Save, save(r.flags)); 35 DRAW(Save, save());
36 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags)); 36 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags));
37 DRAW(PopCull, popCull()); 37 DRAW(PopCull, popCull());
38 DRAW(PushCull, pushCull(r.rect)); 38 DRAW(PushCull, pushCull(r.rect));
39 DRAW(Clear, clear(r.color)); 39 DRAW(Clear, clear(r.color));
40 DRAW(Concat, concat(r.matrix)); 40 DRAW(Concat, concat(r.matrix));
41 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix))); 41 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix)));
42 42
43 DRAW(ClipPath, clipPath(r.path, r.op, r.doAA)); 43 DRAW(ClipPath, clipPath(r.path, r.op, r.doAA));
44 DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA)); 44 DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA));
45 DRAW(ClipRect, clipRect(r.rect, r.op, r.doAA)); 45 DRAW(ClipRect, clipRect(r.rect, r.op, r.doAA));
(...skipping 16 matching lines...) Expand all
62 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); 62 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint));
63 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa int)); 63 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa int));
64 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co lors, 64 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co lors,
65 r.xmode.get(), r.indices, r.indexCount, r.paint) ); 65 r.xmode.get(), r.indices, r.indexCount, r.paint) );
66 #undef DRAW 66 #undef DRAW
67 67
68 template <> void Draw::draw(const PairedPushCull& r) { this->draw(*r.base); } 68 template <> void Draw::draw(const PairedPushCull& r) { this->draw(*r.base); }
69 template <> void Draw::draw(const BoundedDrawPosTextH& r) { this->draw(*r.base); } 69 template <> void Draw::draw(const BoundedDrawPosTextH& r) { this->draw(*r.base); }
70 70
71 } // namespace SkRecords 71 } // namespace SkRecords
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698