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

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

Issue 206853003: Add new experimental API to SkPicture to get "id" of current op (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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 | src/core/SkPicture.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 /* 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
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 private: 342 private:
343 typedef SkNoncopyable INHERITED; 343 typedef SkNoncopyable INHERITED;
344 }; 344 };
345 345
346 /** PRIVATE / EXPERIMENTAL -- do not call 346 /** PRIVATE / EXPERIMENTAL -- do not call
347 Return the operations required to render the content inside 'queryRect'. 347 Return the operations required to render the content inside 'queryRect'.
348 */ 348 */
349 const OperationList& EXPERIMENTAL_getActiveOps(const SkIRect& queryRect); 349 const OperationList& EXPERIMENTAL_getActiveOps(const SkIRect& queryRect);
350 350
351 /** PRIVATE / EXPERIMENTAL -- do not call
352 Return the ID of the operation currently being executed when playing
353 back. 0 indicates no call is active.
354 */
355 size_t EXPERIMENTAL_curOpID() const;
356
351 void createHeader(SkPictInfo* info) const; 357 void createHeader(SkPictInfo* info) const;
352 static bool IsValidPictInfo(const SkPictInfo& info); 358 static bool IsValidPictInfo(const SkPictInfo& info);
353 359
354 friend class SkFlatPicture; 360 friend class SkFlatPicture;
355 friend class SkPicturePlayback; 361 friend class SkPicturePlayback;
356 friend class SkGpuDevice; 362 friend class SkGpuDevice;
363 friend class GrGatherDevice;
364 friend class SkDebugCanvas;
357 365
358 typedef SkRefCnt INHERITED; 366 typedef SkRefCnt INHERITED;
359 }; 367 };
360 368
361 /** 369 /**
362 * Subclasses of this can be passed to canvas.drawPicture. During the drawing 370 * Subclasses of this can be passed to canvas.drawPicture. During the drawing
363 * of the picture, this callback will periodically be invoked. If its 371 * of the picture, this callback will periodically be invoked. If its
364 * abortDrawing() returns true, then picture playback will be interrupted. 372 * abortDrawing() returns true, then picture playback will be interrupted.
365 * 373 *
366 * The resulting drawing is undefined, as there is no guarantee how often the 374 * The resulting drawing is undefined, as there is no guarantee how often the
367 * callback will be invoked. If the abort happens inside some level of nested 375 * callback will be invoked. If the abort happens inside some level of nested
368 * calls to save(), restore will automatically be called to return the state 376 * calls to save(), restore will automatically be called to return the state
369 * to the same level it was before the drawPicture call was made. 377 * to the same level it was before the drawPicture call was made.
370 */ 378 */
371 class SK_API SkDrawPictureCallback { 379 class SK_API SkDrawPictureCallback {
372 public: 380 public:
373 SkDrawPictureCallback() {} 381 SkDrawPictureCallback() {}
374 virtual ~SkDrawPictureCallback() {} 382 virtual ~SkDrawPictureCallback() {}
375 383
376 virtual bool abortDrawing() = 0; 384 virtual bool abortDrawing() = 0;
377 }; 385 };
378 386
379 #endif 387 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698