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

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

Issue 1098183003: Reduce ref counting in SkPictureRecorder. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 8 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 | « no previous file | src/core/SkPicture.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 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 8
9 #ifndef SkPicture_DEFINED 9 #ifndef SkPicture_DEFINED
10 #define SkPicture_DEFINED 10 #define SkPicture_DEFINED
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Only SKPs within the min/current picture version range (inclusive) can be read. 252 // Only SKPs within the min/current picture version range (inclusive) can be read.
253 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M3 9. 253 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M3 9.
254 static const uint32_t CURRENT_PICTURE_VERSION = 41; 254 static const uint32_t CURRENT_PICTURE_VERSION = 41;
255 255
256 static_assert(MIN_PICTURE_VERSION <= 41, 256 static_assert(MIN_PICTURE_VERSION <= 41,
257 "Remove kFontFileName and related code from SkFontDescriptor.c pp."); 257 "Remove kFontFileName and related code from SkFontDescriptor.c pp.");
258 258
259 void createHeader(SkPictInfo* info) const; 259 void createHeader(SkPictInfo* info) const;
260 static bool IsValidPictInfo(const SkPictInfo& info); 260 static bool IsValidPictInfo(const SkPictInfo& info);
261 261
262 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o ptional) BBH. 262 // Takes ownership of the (optional) SnapshotArray.
263 // For performance, we take ownership of the caller's refs on the SkRecord a nd BBH.
263 SkPicture(const SkRect& cullRect, 264 SkPicture(const SkRect& cullRect,
264 SkRecord*, 265 SkRecord*,
265 SnapshotArray*, 266 SnapshotArray*,
266 SkBBoxHierarchy*, 267 SkBBoxHierarchy*,
267 size_t approxBytesUsedBySubPictures); 268 size_t approxBytesUsedBySubPictures);
268 269
269 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); 270 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*);
270 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, 271 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&,
271 SkPicture const* const drawablePics[], int dr awableCount); 272 SkPicture const* const drawablePics[], int dr awableCount);
272 273
(...skipping 26 matching lines...) Expand all
299 300
300 friend class SkPictureRecorder; // SkRecord-based constructor. 301 friend class SkPictureRecorder; // SkRecord-based constructor.
301 friend class GrLayerHoister; // access to fRecord 302 friend class GrLayerHoister; // access to fRecord
302 friend class ReplaceDraw; 303 friend class ReplaceDraw;
303 friend class SkPictureUtils; 304 friend class SkPictureUtils;
304 friend class SkRecordedDrawable; 305 friend class SkRecordedDrawable;
305 }; 306 };
306 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 88, SkPictureSize); 307 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 88, SkPictureSize);
307 308
308 #endif 309 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698