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

Side by Side Diff: include/core/SkPicture.h

Issue 540963002: Change SkPicture::draw to playback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « gyp/skia_for_chromium_defines.gypi ('k') | samplecode/SampleAll.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 /* 2 /*
3 * Copyright 2007 The Android Open Source Project 3 * Copyright 2007 The Android Open Source Project
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 8
9 9
10 #ifndef SkPicture_DEFINED 10 #ifndef SkPicture_DEFINED
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 virtual ~SkPicture(); 105 virtual ~SkPicture();
106 106
107 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE 107 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE
108 /** 108 /**
109 * Creates a thread-safe clone of the picture that is ready for playback. 109 * Creates a thread-safe clone of the picture that is ready for playback.
110 */ 110 */
111 SkPicture* clone() const; 111 SkPicture* clone() const;
112 #endif 112 #endif
113 113
114 /** Replays the drawing commands on the specified canvas. 114 /** Replays the drawing commands on the specified canvas. Note that
115 this has the effect of unfurling this picture into the destination
116 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio n
117 canvas the option of just taking a ref.
115 @param canvas the canvas receiving the drawing commands. 118 @param canvas the canvas receiving the drawing commands.
119 @param callback a callback that allows interruption of playback
116 */ 120 */
117 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; 121 void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const;
reed1 2014/09/04 15:13:38 I wonder if this class should also be renamed, to
122
123 #ifdef SK_LEGACY_PICTURE_DRAW_API
124 void draw(SkCanvas* canvas, SkDrawPictureCallback* callback = NULL) const {
125 this->playback(canvas, callback);
126 }
127 #endif
118 128
119 #ifdef SK_LEGACY_PICTURE_SIZE_API 129 #ifdef SK_LEGACY_PICTURE_SIZE_API
120 int width() const { return SkScalarCeilToInt(fCullWidth); } 130 int width() const { return SkScalarCeilToInt(fCullWidth); }
121 int height() const { return SkScalarCeilToInt(fCullHeight); } 131 int height() const { return SkScalarCeilToInt(fCullHeight); }
122 #endif 132 #endif
123 133
124 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth, cullHeight }. 134 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth, cullHeight }.
125 It does not necessarily reflect the bounds of what has been recorded int o the picture. 135 It does not necessarily reflect the bounds of what has been recorded int o the picture.
126 @return the cull rect used to create this picture 136 @return the cull rect used to create this picture
127 */ 137 */
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 bool fWillPlaybackBitmaps; 321 bool fWillPlaybackBitmaps;
312 bool fHasText; 322 bool fHasText;
313 int fNumPaintWithPathEffectUses; 323 int fNumPaintWithPathEffectUses;
314 int fNumFastPathDashEffects; 324 int fNumFastPathDashEffects;
315 int fNumAAConcavePaths; 325 int fNumAAConcavePaths;
316 int fNumAAHairlineConcavePaths; 326 int fNumAAHairlineConcavePaths;
317 } fAnalysis; 327 } fAnalysis;
318 }; 328 };
319 329
320 #endif 330 #endif
OLDNEW
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698