aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceContext.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-10 08:19:26 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-10 12:56:33 +0000
commita90aa2bfd430ca9bc321c3c7b3f1c727927606d1 (patch)
tree48176ea4a4fb3d529760e60ca9e9ca3978c5cf39 /src/gpu/GrSurfaceContext.h
parent768f52ff85662e6627438987e3277f3926eb6577 (diff)
consolidate read/writePixels in GrSurfaceContext
Change-Id: I118fcd49990597d4dfea92efd3f9d99e52fdbfab Reviewed-on: https://skia-review.googlesource.com/11481 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceContext.h')
-rw-r--r--src/gpu/GrSurfaceContext.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/gpu/GrSurfaceContext.h b/src/gpu/GrSurfaceContext.h
index 88badc1c6e..bab753c069 100644
--- a/src/gpu/GrSurfaceContext.h
+++ b/src/gpu/GrSurfaceContext.h
@@ -74,9 +74,7 @@ public:
* unsupported pixel config.
*/
bool readPixels(const SkImageInfo& dstInfo, void* dstBuffer, size_t dstRowBytes,
- int x, int y, uint32_t flags = 0) {
- return this->onReadPixels(dstInfo, dstBuffer, dstRowBytes, x, y, flags);
- }
+ int x, int y, uint32_t flags = 0);
/**
* Writes a rectangle of pixels [srcInfo, srcBuffer, srcRowbytes] into the
@@ -91,9 +89,7 @@ public:
* unsupported pixel config.
*/
bool writePixels(const SkImageInfo& srcInfo, const void* srcBuffer, size_t srcRowBytes,
- int x, int y, uint32_t flags = 0) {
- return this->onWritePixels(srcInfo, srcBuffer, srcRowBytes, x, y, flags);
- }
+ int x, int y, uint32_t flags = 0);
// TODO: this is virtual b.c. this object doesn't have a pointer to the wrapped GrSurfaceProxy?
virtual GrSurfaceProxy* asSurfaceProxy() = 0;
@@ -129,20 +125,14 @@ protected:
sk_sp<SkColorSpace> fColorSpace;
GrAuditTrail* fAuditTrail;
- // In debug builds we guard against improper thread handling
- SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
-
private:
- virtual bool onCopy(GrSurfaceProxy* src,
- const SkIRect& srcRect,
- const SkIPoint& dstPoint) = 0;
- virtual bool onReadPixels(const SkImageInfo& dstInfo, void* dstBuffer,
- size_t dstRowBytes, int x, int y, uint32_t flags) = 0;
- virtual bool onWritePixels(const SkImageInfo& srcInfo, const void* srcBuffer,
- size_t srcRowBytes, int x, int y, uint32_t flags) = 0;
+ virtual bool onCopy(GrSurfaceProxy* src, const SkIRect& srcRect, const SkIPoint& dstPoint) = 0;
GrDrawingManager* fDrawingManager;
+ // In debug builds we guard against improper thread handling
+ SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
+
typedef SkRefCnt INHERITED;
};