aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrTextureContext.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-01-18 10:08:39 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-18 16:22:59 +0000
commit2c86249465c28a532c8be55b6ba497021e3110ec (patch)
treeb33ecbfb9bfdb8e848e461ea67beeca1097d9cb6 /include/gpu/GrTextureContext.h
parentdfff166db5d5226dc002a22ab3e3097ef971d615 (diff)
Move read/write-Pixels up to GrSurfaceContext
This still needs to be propagated out in several ways: replace more instances of GrSurface::read/write-Pixels add colorSpace to more instances of the TextureContext but it establishes a beach-head and is exciting enough as is. Change-Id: If86035aa0245e70b54541e83722b3c75bc5ade13 Reviewed-on: https://skia-review.googlesource.com/7172 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/GrTextureContext.h')
-rw-r--r--include/gpu/GrTextureContext.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/gpu/GrTextureContext.h b/include/gpu/GrTextureContext.h
index ef9613f3c3..b49b27255a 100644
--- a/include/gpu/GrTextureContext.h
+++ b/include/gpu/GrTextureContext.h
@@ -32,8 +32,8 @@ public:
GrRenderTargetProxy* asDeferredRenderTarget() override;
protected:
- GrTextureContext(GrContext*, GrDrawingManager*, sk_sp<GrTextureProxy>, GrAuditTrail*,
- GrSingleOwner*);
+ GrTextureContext(GrContext*, GrDrawingManager*, sk_sp<GrTextureProxy>,
+ sk_sp<SkColorSpace>, GrAuditTrail*, GrSingleOwner*);
GrDrawingManager* drawingManager() { return fDrawingManager; }
@@ -43,6 +43,10 @@ private:
friend class GrDrawingManager; // for ctor
bool onCopy(GrSurfaceProxy* src, const SkIRect& srcRect, const SkIPoint& dstPoint) override;
+ bool onReadPixels(const SkImageInfo& dstInfo, void* dstBuffer,
+ size_t dstRowBytes, int x, int y) override;
+ bool onWritePixels(const SkImageInfo& srcInfo, const void* srcBuffer,
+ size_t srcRowBytes, int x, int y) override;
GrTextureOpList* getOpList();