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

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

Issue 788903006: Remove legacy Picture defines. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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_android_framework_defines.gypi ('k') | include/core/SkPictureRecorder.h » ('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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 /** Replays the drawing commands on the specified canvas. Note that 108 /** Replays the drawing commands on the specified canvas. Note that
109 this has the effect of unfurling this picture into the destination 109 this has the effect of unfurling this picture into the destination
110 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio n 110 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio n
111 canvas the option of just taking a ref. 111 canvas the option of just taking a ref.
112 @param canvas the canvas receiving the drawing commands. 112 @param canvas the canvas receiving the drawing commands.
113 @param callback a callback that allows interruption of playback 113 @param callback a callback that allows interruption of playback
114 */ 114 */
115 void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; 115 void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const;
116 116
117 #ifdef SK_LEGACY_PICTURE_DRAW_API
118 void draw(SkCanvas* canvas, SkDrawPictureCallback* callback = NULL) const {
119 this->playback(canvas, callback);
120 }
121 #endif
122
123 #ifdef SK_LEGACY_PICTURE_SIZE_API
124 int width() const { return fCullRect.roundOut().width(); }
125 int height() const { return fCullRect.roundOut().height(); }
126 #endif
127
128 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth, cullHeight }. 117 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth, cullHeight }.
129 It does not necessarily reflect the bounds of what has been recorded int o the picture. 118 It does not necessarily reflect the bounds of what has been recorded int o the picture.
130 @return the cull rect used to create this picture 119 @return the cull rect used to create this picture
131 */ 120 */
132 SkRect cullRect() const { return fCullRect; } 121 SkRect cullRect() const { return fCullRect; }
133 122
134 /** Return a non-zero, unique value representing the picture. 123 /** Return a non-zero, unique value representing the picture.
135 */ 124 */
136 uint32_t uniqueID() const { return fUniqueID; } 125 uint32_t uniqueID() const { return fUniqueID; }
137 126
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 305
317 friend class SkPictureRecorder; // SkRecord-based constructor. 306 friend class SkPictureRecorder; // SkRecord-based constructor.
318 friend class GrLayerHoister; // access to fRecord 307 friend class GrLayerHoister; // access to fRecord
319 friend class ReplaceDraw; 308 friend class ReplaceDraw;
320 friend class SkPictureUtils; 309 friend class SkPictureUtils;
321 friend class SkRecordedDrawable; 310 friend class SkRecordedDrawable;
322 }; 311 };
323 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); 312 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize);
324 313
325 #endif 314 #endif
OLDNEW
« no previous file with comments | « gyp/skia_for_android_framework_defines.gypi ('k') | include/core/SkPictureRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698