Index: src/gpu/GrSurface.cpp |
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp |
index 886945c71036052812e3e0e003ad931b1dfd672d..63e0090b54303f701d092b481b4e9c95e893bbc7 100644 |
--- a/src/gpu/GrSurface.cpp |
+++ b/src/gpu/GrSurface.cpp |
@@ -116,6 +116,22 @@ bool GrSurface::readPixels(int left, int top, int width, int height, |
rowBytes, pixelOpsFlags); |
} |
+bool GrSurface::writePixelsWithColorSpace(int left, int top, int width, int height, |
+ GrPixelConfig config, |
+ const SkColorSpace* srcColorSpace, |
+ const SkColorSpace* dstColorSpace, |
+ const void* buffer, size_t rowBytes, |
+ uint32_t colorSpaceOpsFlags) { |
+ // go through context so that all necessary flushing occurs |
+ GrContext* context = this->getContext(); |
+ if (nullptr == context) { |
+ return false; |
+ } |
+ return context->writeSurfacePixelsWithColorSpace(this, left, top, width, height, config, |
+ srcColorSpace, dstColorSpace, buffer, |
+ rowBytes, colorSpaceOpsFlags); |
+} |
+ |
SkImageInfo GrSurface::info(SkAlphaType alphaType) const { |
SkColorType colorType; |
SkColorProfileType profileType; |