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

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

Issue 313613004: Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add staging entry point for Chromium and Android Created 6 years, 6 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
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 * These properties will be applied by the draw, when and as it can. 336 * These properties will be applied by the draw, when and as it can.
337 * If the device does handle a property, that property should be set to the identity value 337 * If the device does handle a property, that property should be set to the identity value
338 * for that property, effectively making it non-leaky. 338 * for that property, effectively making it non-leaky.
339 */ 339 */
340 SkDeviceProperties fLeakyProperties; 340 SkDeviceProperties fLeakyProperties;
341 341
342 /** 342 /**
343 * PRIVATE / EXPERIMENTAL -- do not call 343 * PRIVATE / EXPERIMENTAL -- do not call
344 * Construct an acceleration object and attach it to 'picture' 344 * Construct an acceleration object and attach it to 'picture'
345 */ 345 */
346 virtual void EXPERIMENTAL_optimize(SkPicture* picture); 346 virtual void EXPERIMENTAL_optimize(const SkPicture* picture);
347 347
348 /** 348 /**
349 * PRIVATE / EXPERIMENTAL -- do not call 349 * PRIVATE / EXPERIMENTAL -- do not call
350 * Purge all discardable optimization information for 'picture'. If 350 * Purge all discardable optimization information for 'picture'. If
351 * picture is NULL then purge discardable information for all pictures. 351 * picture is NULL then purge discardable information for all pictures.
352 */ 352 */
353 virtual void EXPERIMENTAL_purge(SkPicture* picture); 353 virtual void EXPERIMENTAL_purge(const SkPicture* picture);
354 354
355 /** 355 /**
356 * PRIVATE / EXPERIMENTAL -- do not call 356 * PRIVATE / EXPERIMENTAL -- do not call
357 * This entry point gives the backend an opportunity to take over the rende ring 357 * This entry point gives the backend an opportunity to take over the rende ring
358 * of 'picture'. If optimization data is available (due to an earlier 358 * of 'picture'. If optimization data is available (due to an earlier
359 * 'optimize' call) this entry point should make use of it and return true 359 * 'optimize' call) this entry point should make use of it and return true
360 * if all rendering has been done. If false is returned, SkCanvas will 360 * if all rendering has been done. If false is returned, SkCanvas will
361 * perform its own rendering pass. It is acceptable for the backend 361 * perform its own rendering pass. It is acceptable for the backend
362 * to perform some device-specific warm up tasks and then let SkCanvas 362 * to perform some device-specific warm up tasks and then let SkCanvas
363 * perform the main rendering loop (by return false from here). 363 * perform the main rendering loop (by return false from here).
364 */ 364 */
365 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, SkPicture* picture); 365 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic ture);
366 366
367 private: 367 private:
368 friend class SkCanvas; 368 friend class SkCanvas;
369 friend struct DeviceCM; //for setMatrixClip 369 friend struct DeviceCM; //for setMatrixClip
370 friend class SkDraw; 370 friend class SkDraw;
371 friend class SkDrawIter; 371 friend class SkDrawIter;
372 friend class SkDeviceFilteredPaint; 372 friend class SkDeviceFilteredPaint;
373 friend class SkDeviceImageFilterProxy; 373 friend class SkDeviceImageFilterProxy;
374 friend class SkDeferredDevice; // for newSurface 374 friend class SkDeferredDevice; // for newSurface
375 375
(...skipping 22 matching lines...) Expand all
398 SkMetaData* fMetaData; 398 SkMetaData* fMetaData;
399 399
400 #ifdef SK_DEBUG 400 #ifdef SK_DEBUG
401 bool fAttachedToCanvas; 401 bool fAttachedToCanvas;
402 #endif 402 #endif
403 403
404 typedef SkRefCnt INHERITED; 404 typedef SkRefCnt INHERITED;
405 }; 405 };
406 406
407 #endif 407 #endif
OLDNEW
« include/core/SkCanvas.h ('K') | « include/core/SkCanvas.h ('k') | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698