Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: src/gpu/GrSurface.cpp

Issue 1919993002: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Plumb gamma to shader, fix window title Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698