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

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

Issue 2340133002: Clean up unused SkPictureRecorder::optimizeFor() (Closed)
Patch Set: Created 4 years, 3 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/SkPictureRecorder.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 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 SkPicture* SK_WARN_UNUSED_RESULT endRecordingAsPicture(const SkRect& cullRec t) { 106 SkPicture* SK_WARN_UNUSED_RESULT endRecordingAsPicture(const SkRect& cullRec t) {
107 return this->finishRecordingAsPictureWithCull(cullRect).release(); 107 return this->finishRecordingAsPictureWithCull(cullRect).release();
108 } 108 }
109 SkDrawable* SK_WARN_UNUSED_RESULT endRecordingAsDrawable() { 109 SkDrawable* SK_WARN_UNUSED_RESULT endRecordingAsDrawable() {
110 return this->finishRecordingAsDrawable().release(); 110 return this->finishRecordingAsDrawable().release();
111 } 111 }
112 SkPicture* SK_WARN_UNUSED_RESULT endRecording() { return this->endRecordingA sPicture(); } 112 SkPicture* SK_WARN_UNUSED_RESULT endRecording() { return this->endRecordingA sPicture(); }
113 #endif 113 #endif
114 114
115 // Strawman API.
116 void optimizeFor(GrContext* ctx) { fGrContextToOptimizeFor = ctx; }
117
118 private: 115 private:
119 void reset(); 116 void reset();
120 117
121 /** Replay the current (partially recorded) operation stream into 118 /** Replay the current (partially recorded) operation stream into
122 canvas. This call doesn't close the current recording. 119 canvas. This call doesn't close the current recording.
123 */ 120 */
124 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 121 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
125 friend class android::Picture; 122 friend class android::Picture;
126 #endif 123 #endif
127 friend class SkPictureRecorderReplayTester; // for unit testing 124 friend class SkPictureRecorderReplayTester; // for unit testing
128 void partialReplay(SkCanvas* canvas) const; 125 void partialReplay(SkCanvas* canvas) const;
129 126
130 bool fActivelyRecording; 127 bool fActivelyRecording;
131 uint32_t fFlags; 128 uint32_t fFlags;
132 SkRect fCullRect; 129 SkRect fCullRect;
133 SkAutoTUnref<SkBBoxHierarchy> fBBH; 130 SkAutoTUnref<SkBBoxHierarchy> fBBH;
134 SkAutoTUnref<SkRecorder> fRecorder; 131 SkAutoTUnref<SkRecorder> fRecorder;
135 SkAutoTUnref<SkRecord> fRecord; 132 SkAutoTUnref<SkRecord> fRecord;
136 SkMiniRecorder fMiniRecorder; 133 SkMiniRecorder fMiniRecorder;
137 134
138 GrContext* fGrContextToOptimizeFor = nullptr;
139
140 typedef SkNoncopyable INHERITED; 135 typedef SkNoncopyable INHERITED;
141 }; 136 };
142 137
143 #endif 138 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698