aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkCanvas.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-12-25 12:56:03 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-25 12:56:03 -0800
commit48eb08a790b32a4d39d8bb91983434e25d8b0b4e (patch)
tree604a809a735f6bfe4398867799b0a1e940e0bc6f /include/core/SkCanvas.h
parent0b70f45be88538d31183e4e0c3c6b33f4e82469b (diff)
remove unused SkAutoROCanvasPixels
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r--include/core/SkCanvas.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 854611aec1..d36b9918e4 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) {