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

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

Issue 617953002: Strip old backend recording down to essentials (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: debug-only Created 6 years, 2 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 | « include/core/SkPicture.h ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 #ifndef SkPictureRecorder_DEFINED 8 #ifndef SkPictureRecorder_DEFINED
9 #define SkPictureRecorder_DEFINED 9 #define SkPictureRecorder_DEFINED
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 */ 65 */
66 SkCanvas* getRecordingCanvas(); 66 SkCanvas* getRecordingCanvas();
67 67
68 /** Signal that the caller is done recording. This invalidates the canvas 68 /** Signal that the caller is done recording. This invalidates the canvas
69 returned by beginRecording/getRecordingCanvas, and returns the 69 returned by beginRecording/getRecordingCanvas, and returns the
70 created SkPicture. Note that the returned picture has its creation 70 created SkPicture. Note that the returned picture has its creation
71 ref which the caller must take ownership of. 71 ref which the caller must take ownership of.
72 */ 72 */
73 SkPicture* endRecording(); 73 SkPicture* endRecording();
74 74
75 /** Enable/disable all the picture recording optimizations (i.e.,
76 those in SkPictureRecord). It is mainly intended for testing the
77 existing optimizations (i.e., to actually have the pattern
78 appear in an .skp we have to disable the optimization). Call right
79 after 'beginRecording'.
80 */
81 void internalOnly_EnableOpts(bool enableOpts);
82
83 private: 75 private:
84 void reset(); 76 void reset();
85 77
86 /** Replay the current (partially recorded) operation stream into 78 /** Replay the current (partially recorded) operation stream into
87 canvas. This call doesn't close the current recording. 79 canvas. This call doesn't close the current recording.
88 */ 80 */
89 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 81 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
90 friend class android::Picture; 82 friend class android::Picture;
91 #endif 83 #endif
92 friend class SkPictureRecorderReplayTester; // for unit testing 84 friend class SkPictureRecorderReplayTester; // for unit testing
93 void partialReplay(SkCanvas* canvas) const; 85 void partialReplay(SkCanvas* canvas) const;
94 86
95 SkScalar fCullWidth; 87 SkScalar fCullWidth;
96 SkScalar fCullHeight; 88 SkScalar fCullHeight;
97 SkAutoTUnref<SkBBoxHierarchy> fBBH; 89 SkAutoTUnref<SkBBoxHierarchy> fBBH;
98 90
99 // One of these two canvases will be non-NULL. 91 // One of these two canvases will be non-NULL.
100 SkAutoTUnref<SkPictureRecord> fPictureRecord; // beginRecording() 92 SkAutoTUnref<SkPictureRecord> fPictureRecord; // beginRecording()
101 SkAutoTUnref<SkRecorder> fRecorder; // EXPERIMENTAL_beginRecordin g() 93 SkAutoTUnref<SkRecorder> fRecorder; // EXPERIMENTAL_beginRecordin g()
102 94
103 // Used by EXPERIMENTAL_beginRecording(). 95 // Used by EXPERIMENTAL_beginRecording().
104 SkAutoTDelete<SkRecord> fRecord; 96 SkAutoTDelete<SkRecord> fRecord;
105 97
106 typedef SkNoncopyable INHERITED; 98 typedef SkNoncopyable INHERITED;
107 }; 99 };
108 100
109 #endif 101 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkBBoxHierarchyRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698