| Index: include/core/SkCanvas.h
|
| diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
|
| index 854611aec18a1206a2ed1f4b7e7e9b65a2b450dc..d36b9918e45e68eb40df47c743e36f5dc864b262 100644
|
| --- a/include/core/SkCanvas.h
|
| +++ b/include/core/SkCanvas.h
|
| @@ -1554,49 +1554,6 @@ private:
|
| };
|
| #define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore)
|
|
|
| -/**
|
| - * If the caller wants read-only access to the pixels in a canvas, it can just
|
| - * call canvas->peekPixels(), since that is the fastest way to "peek" at the
|
| - * pixels on a raster-backed canvas.
|
| - *
|
| - * If the canvas has pixels, but they are not readily available to the CPU
|
| - * (e.g. gpu-backed), then peekPixels() will fail, but readPixels() will
|
| - * succeed (though be slower, since it will return a copy of the pixels).
|
| - *
|
| - * SkAutoROCanvasPixels encapsulates these two techniques, trying first to call
|
| - * peekPixels() (for performance), but if that fails, calling readPixels() and
|
| - * storing the copy locally.
|
| - *
|
| - * The caller must respect the restrictions associated with peekPixels(), since
|
| - * that may have been called: The returned information is invalidated if...
|
| - * - any API is called on the canvas (or its parent surface if present)
|
| - * - the canvas goes out of scope
|
| - */
|
| -class SkAutoROCanvasPixels : SkNoncopyable {
|
| -public:
|
| - SkAutoROCanvasPixels(SkCanvas* canvas);
|
| -
|
| - // returns NULL on failure
|
| - const void* addr() const { return fAddr; }
|
| -
|
| - // undefined if addr() == NULL
|
| - size_t rowBytes() const { return fRowBytes; }
|
| -
|
| - // undefined if addr() == NULL
|
| - const SkImageInfo& info() const { return fInfo; }
|
| -
|
| - // helper that, if returns true, installs the pixels into the bitmap. Note
|
| - // that the bitmap may reference the address returned by peekPixels(), so
|
| - // the caller must respect the restrictions associated with peekPixels().
|
| - bool asROBitmap(SkBitmap*) const;
|
| -
|
| -private:
|
| - SkBitmap fBitmap; // used if peekPixels() fails
|
| - const void* fAddr; // NULL on failure
|
| - SkImageInfo fInfo;
|
| - size_t fRowBytes;
|
| -};
|
| -
|
| #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS
|
| static inline SkCanvas::SaveFlags operator|(const SkCanvas::SaveFlags lhs,
|
| const SkCanvas::SaveFlags rhs) {
|
|
|