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

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

Issue 226183018: SkNonCopyable should be used with private inheritance. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: name resolution Created 6 years, 8 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/SkImageDecoder.h ('k') | include/core/SkRefCnt.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 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Create a new SkPicture from an existing SkPicturePlayback. Ref count of 323 // Create a new SkPicture from an existing SkPicturePlayback. Ref count of
324 // playback is unchanged. 324 // playback is unchanged.
325 SkPicture(SkPicturePlayback*, int width, int height); 325 SkPicture(SkPicturePlayback*, int width, int height);
326 326
327 // For testing. Derived classes may instantiate an alternate 327 // For testing. Derived classes may instantiate an alternate
328 // SkBBoxHierarchy implementation 328 // SkBBoxHierarchy implementation
329 virtual SkBBoxHierarchy* createBBoxHierarchy() const; 329 virtual SkBBoxHierarchy* createBBoxHierarchy() const;
330 private: 330 private:
331 // An OperationList encapsulates a set of operation offsets into the picture byte 331 // An OperationList encapsulates a set of operation offsets into the picture byte
332 // stream along with the CTMs needed for those operation. 332 // stream along with the CTMs needed for those operation.
333 class OperationList : public SkNoncopyable { 333 class OperationList : ::SkNoncopyable {
334 public: 334 public:
335 virtual ~OperationList() {} 335 virtual ~OperationList() {}
336 336
337 // If valid returns false then there is no optimization data 337 // If valid returns false then there is no optimization data
338 // present. All the draw operations need to be issued. 338 // present. All the draw operations need to be issued.
339 virtual bool valid() const { return false; } 339 virtual bool valid() const { return false; }
340 340
341 // The following three entry points should only be accessed if 341 // The following three entry points should only be accessed if
342 // 'valid' returns true. 342 // 'valid' returns true.
343 virtual int numOps() const { SkASSERT(false); return 0; }; 343 virtual int numOps() const { SkASSERT(false); return 0; };
344 // The offset in the picture of the operation to execute. 344 // The offset in the picture of the operation to execute.
345 virtual uint32_t offset(int index) const { SkASSERT(false); return 0; }; 345 virtual uint32_t offset(int index) const { SkASSERT(false); return 0; };
346 // The CTM that must be installed for the operation to behave correctly 346 // The CTM that must be installed for the operation to behave correctly
347 virtual const SkMatrix& matrix(int index) const { SkASSERT(false); retur n SkMatrix::I(); } 347 virtual const SkMatrix& matrix(int index) const { SkASSERT(false); retur n SkMatrix::I(); }
348 348
349 static const OperationList& InvalidList(); 349 static const OperationList& InvalidList();
350
351 private:
352 typedef SkNoncopyable INHERITED;
353 }; 350 };
354 351
355 /** PRIVATE / EXPERIMENTAL -- do not call 352 /** PRIVATE / EXPERIMENTAL -- do not call
356 Return the operations required to render the content inside 'queryRect'. 353 Return the operations required to render the content inside 'queryRect'.
357 */ 354 */
358 const OperationList& EXPERIMENTAL_getActiveOps(const SkIRect& queryRect); 355 const OperationList& EXPERIMENTAL_getActiveOps(const SkIRect& queryRect);
359 356
360 /** PRIVATE / EXPERIMENTAL -- do not call 357 /** PRIVATE / EXPERIMENTAL -- do not call
361 Return the ID of the operation currently being executed when playing 358 Return the ID of the operation currently being executed when playing
362 back. 0 indicates no call is active. 359 back. 0 indicates no call is active.
(...skipping 24 matching lines...) Expand all
387 */ 384 */
388 class SK_API SkDrawPictureCallback { 385 class SK_API SkDrawPictureCallback {
389 public: 386 public:
390 SkDrawPictureCallback() {} 387 SkDrawPictureCallback() {}
391 virtual ~SkDrawPictureCallback() {} 388 virtual ~SkDrawPictureCallback() {}
392 389
393 virtual bool abortDrawing() = 0; 390 virtual bool abortDrawing() = 0;
394 }; 391 };
395 392
396 #endif 393 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | include/core/SkRefCnt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698