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

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

Issue 349973008: Tick off some TODOs: (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: robert 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
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkRecordDraw.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 #ifndef SkRecordDraw_DEFINED 8 #ifndef SkRecordDraw_DEFINED
9 #define SkRecordDraw_DEFINED 9 #define SkRecordDraw_DEFINED
10 10
11 #include "SkRecord.h" 11 #include "SkRecord.h"
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 #include "SkDrawPictureCallback.h"
13 14
14 // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::D raw. 15 // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::D raw.
15 void SkRecordDraw(const SkRecord&, SkCanvas*); 16 void SkRecordDraw(const SkRecord&, SkCanvas*, SkDrawPictureCallback* = NULL);
16 17
17 namespace SkRecords { 18 namespace SkRecords {
18 19
19 // This is an SkRecord visitor that will draw that SkRecord to an SkCanvas. 20 // This is an SkRecord visitor that will draw that SkRecord to an SkCanvas.
20 class Draw : SkNoncopyable { 21 class Draw : SkNoncopyable {
21 public: 22 public:
22 explicit Draw(SkCanvas* canvas) 23 explicit Draw(SkCanvas* canvas)
23 : fInitialCTM(canvas->getTotalMatrix()), fCanvas(canvas), fIndex(0) {} 24 : fInitialCTM(canvas->getTotalMatrix()), fCanvas(canvas), fIndex(0) {}
24 25
25 unsigned index() const { return fIndex; } 26 unsigned index() const { return fIndex; }
(...skipping 20 matching lines...) Expand all
46 bool skip(const BoundedDrawPosTextH&); 47 bool skip(const BoundedDrawPosTextH&);
47 48
48 const SkMatrix fInitialCTM; 49 const SkMatrix fInitialCTM;
49 SkCanvas* fCanvas; 50 SkCanvas* fCanvas;
50 unsigned fIndex; 51 unsigned fIndex;
51 }; 52 };
52 53
53 } // namespace SkRecords 54 } // namespace SkRecords
54 55
55 #endif//SkRecordDraw_DEFINED 56 #endif//SkRecordDraw_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698