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

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

Issue 381133002: Remove SkPicture copy constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Removed unused "copy" method Created 6 years, 5 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 | samplecode/SampleApp.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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // This entry point allows user's to get a unique domain prefix 57 // This entry point allows user's to get a unique domain prefix
58 // for their keys 58 // for their keys
59 static Domain GenerateDomain(); 59 static Domain GenerateDomain();
60 private: 60 private:
61 Key fKey; 61 Key fKey;
62 62
63 typedef SkRefCnt INHERITED; 63 typedef SkRefCnt INHERITED;
64 }; 64 };
65 65
66 SkPicture(); 66 SkPicture();
67 /** Make a copy of the contents of src. If src records more drawing after
68 this call, those elements will not appear in this picture.
69 */
70 SkPicture(const SkPicture& src);
71 67
72 /** PRIVATE / EXPERIMENTAL -- do not call */ 68 /** PRIVATE / EXPERIMENTAL -- do not call */
73 void EXPERIMENTAL_addAccelData(const AccelData*) const; 69 void EXPERIMENTAL_addAccelData(const AccelData*) const;
74 70
75 /** PRIVATE / EXPERIMENTAL -- do not call */ 71 /** PRIVATE / EXPERIMENTAL -- do not call */
76 const AccelData* EXPERIMENTAL_getAccelData(AccelData::Key) const; 72 const AccelData* EXPERIMENTAL_getAccelData(AccelData::Key) const;
77 73
78 /** 74 /**
79 * Function signature defining a function that sets up an SkBitmap from enc oded data. On 75 * Function signature defining a function that sets up an SkBitmap from enc oded data. On
80 * success, the SkBitmap should have its Config, width, height, rowBytes an d pixelref set. 76 * success, the SkBitmap should have its Config, width, height, rowBytes an d pixelref set.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void serialize(SkWStream*, EncodeBitmap encoder = NULL) const; 167 void serialize(SkWStream*, EncodeBitmap encoder = NULL) const;
172 168
173 /** 169 /**
174 * Serialize to a buffer. 170 * Serialize to a buffer.
175 */ 171 */
176 void flatten(SkWriteBuffer&) const; 172 void flatten(SkWriteBuffer&) const;
177 173
178 /** 174 /**
179 * Returns true if any bitmaps may be produced when this SkPicture 175 * Returns true if any bitmaps may be produced when this SkPicture
180 * is replayed. 176 * is replayed.
181 * Returns false if called while still recording.
182 */ 177 */
183 bool willPlayBackBitmaps() const; 178 bool willPlayBackBitmaps() const;
184 179
185 /** Return true if the SkStream/Buffer represents a serialized picture, and 180 /** Return true if the SkStream/Buffer represents a serialized picture, and
186 fills out SkPictInfo. After this function returns, the data source is no t 181 fills out SkPictInfo. After this function returns, the data source is no t
187 rewound so it will have to be manually reset before passing to 182 rewound so it will have to be manually reset before passing to
188 CreateFromStream or CreateFromBuffer. Note, CreateFromStream and 183 CreateFromStream or CreateFromBuffer. Note, CreateFromStream and
189 CreateFromBuffer perform this check internally so these entry points are 184 CreateFromBuffer perform this check internally so these entry points are
190 intended for stand alone tools. 185 intended for stand alone tools.
191 If false is returned, SkPictInfo is unmodified. 186 If false is returned, SkPictInfo is unmodified.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 mutable SkAutoTUnref<const AccelData> fAccelData; 243 mutable SkAutoTUnref<const AccelData> fAccelData;
249 244
250 void needsNewGenID() { fUniqueID = SK_InvalidGenID; } 245 void needsNewGenID() { fUniqueID = SK_InvalidGenID; }
251 246
252 // Create a new SkPicture from an existing SkPictureData. Ref count of 247 // Create a new SkPicture from an existing SkPictureData. Ref count of
253 // data is unchanged. 248 // data is unchanged.
254 SkPicture(SkPictureData* data, int width, int height); 249 SkPicture(SkPictureData* data, int width, int height);
255 250
256 SkPicture(int width, int height, const SkPictureRecord& record, bool deepCop yOps); 251 SkPicture(int width, int height, const SkPictureRecord& record, bool deepCop yOps);
257 252
258 static void WriteTagSize(SkWriteBuffer& buffer, uint32_t tag, size_t size);
259 static void WriteTagSize(SkWStream* stream, uint32_t tag, size_t size);
260
261 // An OperationList encapsulates a set of operation offsets into the picture byte 253 // An OperationList encapsulates a set of operation offsets into the picture byte
262 // stream along with the CTMs needed for those operation. 254 // stream along with the CTMs needed for those operation.
263 class OperationList : ::SkNoncopyable { 255 class OperationList : ::SkNoncopyable {
264 public: 256 public:
265 // The following three entry points should only be accessed if 257 // The following three entry points should only be accessed if
266 // 'valid' returns true. 258 // 'valid' returns true.
267 int numOps() const { return fOps.count(); } 259 int numOps() const { return fOps.count(); }
268 // The offset in the picture of the operation to execute. 260 // The offset in the picture of the operation to execute.
269 uint32_t offset(int index) const; 261 uint32_t offset(int index) const;
270 // The CTM that must be installed for the operation to behave correctly 262 // The CTM that must be installed for the operation to behave correctly
(...skipping 18 matching lines...) Expand all
289 friend class SkPictureReplacementPlayback; // to access OperationList 281 friend class SkPictureReplacementPlayback; // to access OperationList
290 282
291 typedef SkRefCnt INHERITED; 283 typedef SkRefCnt INHERITED;
292 284
293 SkPicture(int width, int height, SkRecord*); // Takes ownership. 285 SkPicture(int width, int height, SkRecord*); // Takes ownership.
294 SkAutoTDelete<SkRecord> fRecord; 286 SkAutoTDelete<SkRecord> fRecord;
295 bool fRecordWillPlayBackBitmaps; // TODO: const 287 bool fRecordWillPlayBackBitmaps; // TODO: const
296 }; 288 };
297 289
298 #endif 290 #endif
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698