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

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

Issue 249453002: First step in pulling SkPicturePlayback & SkPictureRecord out of SkPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleanup Created 6 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 | Annotate | Revision Log
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/core/SkBBoxHierarchyRecord.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
11 #define SkPicture_DEFINED 11 #define SkPicture_DEFINED
12 12
13 #include "SkBitmap.h" 13 #include "SkBitmap.h"
14 #include "SkImageDecoder.h" 14 #include "SkImageDecoder.h"
15 #include "SkRefCnt.h" 15 #include "SkRefCnt.h"
16 16
17 #if SK_SUPPORT_GPU 17 #if SK_SUPPORT_GPU
18 class GrContext; 18 class GrContext;
19 #endif 19 #endif
20 20
21 class SkBBHFactory; 21 class SkBBHFactory;
22 class SkBBoxHierarchy; 22 class SkBBoxHierarchy;
23 class SkCanvas; 23 class SkCanvas;
24 class SkDrawPictureCallback; 24 class SkDrawPictureCallback;
25 class SkData; 25 class SkData;
26 class SkPathHeap;
26 class SkPicturePlayback; 27 class SkPicturePlayback;
27 class SkPictureRecord; 28 class SkPictureRecord;
28 class SkStream; 29 class SkStream;
29 class SkWStream; 30 class SkWStream;
30 31
31 struct SkPictInfo; 32 struct SkPictInfo;
32 33
33 /** \class SkPicture 34 /** \class SkPicture
34 35
35 The SkPicture class records the drawing commands made to a canvas, to 36 The SkPicture class records the drawing commands made to a canvas, to
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 352
352 #ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES 353 #ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
353 // For testing. Derived classes may instantiate an alternate 354 // For testing. Derived classes may instantiate an alternate
354 // SkBBoxHierarchy implementation 355 // SkBBoxHierarchy implementation
355 virtual SkBBoxHierarchy* createBBoxHierarchy() const; 356 virtual SkBBoxHierarchy* createBBoxHierarchy() const;
356 #endif 357 #endif
357 358
358 SkCanvas* beginRecording(int width, int height, SkBBHFactory* factory, uint3 2_t recordFlags); 359 SkCanvas* beginRecording(int width, int height, SkBBHFactory* factory, uint3 2_t recordFlags);
359 360
360 private: 361 private:
362 friend class SkPictureRecord;
363 friend class SkPictureTester; // for unit testing
364
365 SkAutoTUnref<SkPathHeap> fPathHeap; // reference counted
366
367 const SkPath& getPath(int index) const;
368 int addPathToHeap(const SkPath& path);
369
370 void flattenToBuffer(SkWriteBuffer& buffer) const;
371 bool parseBufferTag(SkReadBuffer& buffer, uint32_t tag, uint32_t size);
372
373 static void WriteTagSize(SkWriteBuffer& buffer, uint32_t tag, size_t size);
374 static void WriteTagSize(SkWStream* stream, uint32_t tag, size_t size);
375
376 void initForPlayback() const;
377 void dumpSize() const;
378
361 // An OperationList encapsulates a set of operation offsets into the picture byte 379 // An OperationList encapsulates a set of operation offsets into the picture byte
362 // stream along with the CTMs needed for those operation. 380 // stream along with the CTMs needed for those operation.
363 class OperationList : ::SkNoncopyable { 381 class OperationList : ::SkNoncopyable {
364 public: 382 public:
365 virtual ~OperationList() {} 383 virtual ~OperationList() {}
366 384
367 // If valid returns false then there is no optimization data 385 // If valid returns false then there is no optimization data
368 // present. All the draw operations need to be issued. 386 // present. All the draw operations need to be issued.
369 virtual bool valid() const { return false; } 387 virtual bool valid() const { return false; }
370 388
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 typedef SkRefCnt INHERITED; 452 typedef SkRefCnt INHERITED;
435 }; 453 };
436 454
437 #endif 455 #endif
438 456
439 #ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS 457 #ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS
440 #include "SkPictureRecorder.h" 458 #include "SkPictureRecorder.h"
441 #endif 459 #endif
442 460
443 #endif 461 #endif
OLDNEW
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/core/SkBBoxHierarchyRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698