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

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

Issue 197123003: Proposed SkCanvas API for preLoading textures to VRAM v2.0 (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: address code review comments Created 6 years, 9 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 | « no previous file | include/core/SkPicture.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 2010 The Android Open Source Project 3 * Copyright 2010 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 SkDevice_DEFINED 10 #ifndef SkDevice_DEFINED
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 * possibly from SkCanvas' dtor. 171 * possibly from SkCanvas' dtor.
172 */ 172 */
173 virtual void onDetachFromCanvas() { 173 virtual void onDetachFromCanvas() {
174 SkASSERT(fAttachedToCanvas); 174 SkASSERT(fAttachedToCanvas);
175 this->unlockPixels(); 175 this->unlockPixels();
176 #ifdef SK_DEBUG 176 #ifdef SK_DEBUG
177 fAttachedToCanvas = false; 177 fAttachedToCanvas = false;
178 #endif 178 #endif
179 }; 179 };
180 180
181 /**
reed1 2014/03/13 18:33:55 Not sure I follow why we have two of these. - does
robertphillips 2014/03/13 19:58:28 There are two possible landing points for this. In
182 * PRIVATE / EXPERIMENTAL -- do not call
183 * Construct an acceleration object and attach it to 'picture'
184 */
185 virtual void EXPERIMENTAL_optimize(SkPicture* picture);
186
187 /**
188 * PRIVATE / EXPERIMENTAL -- do not call
189 * Possibly use the results of an earlier 'optimize' call to render 'pictur e'.
190 * Return true if all rendering has been done; false if the caller
191 * (i.e., SkCanvas) should render normally.
192 */
193 virtual bool EXPERIMENTAL_optimizedRender(const SkPicture& picture);
194
181 protected: 195 protected:
182 enum Usage { 196 enum Usage {
183 kGeneral_Usage, 197 kGeneral_Usage,
184 kSaveLayer_Usage // <! internal use only 198 kSaveLayer_Usage // <! internal use only
185 }; 199 };
186 200
187 struct TextFlags { 201 struct TextFlags {
188 uint32_t fFlags; // SkPaint::getFlags() 202 uint32_t fFlags; // SkPaint::getFlags()
189 SkPaint::Hinting fHinting; 203 SkPaint::Hinting fHinting;
190 }; 204 };
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 SkMetaData* fMetaData; 467 SkMetaData* fMetaData;
454 468
455 #ifdef SK_DEBUG 469 #ifdef SK_DEBUG
456 bool fAttachedToCanvas; 470 bool fAttachedToCanvas;
457 #endif 471 #endif
458 472
459 typedef SkRefCnt INHERITED; 473 typedef SkRefCnt INHERITED;
460 }; 474 };
461 475
462 #endif 476 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698