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

Unified Diff: tools/viewer/sk_app/WindowContext.cpp

Issue 2176383002: start on apply gamma cleanup (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/WindowContext.cpp
diff --git a/tools/viewer/sk_app/WindowContext.cpp b/tools/viewer/sk_app/WindowContext.cpp
index 5d364bc497bf8273572480c19af6f035c428f2c2..7c3bae67f08f7c6651123db4c4cf68564986349b 100755
--- a/tools/viewer/sk_app/WindowContext.cpp
+++ b/tools/viewer/sk_app/WindowContext.cpp
@@ -65,6 +65,8 @@ void WindowContext::presentRenderSurface(sk_sp<SkSurface> renderSurface, sk_sp<G
int colorBits) {
if (!this->isGpuContext() || colorBits > 24 ||
kRGBA_F16_SkColorType == fDisplayParams.fColorType) {
+ sk_sp<SkImage> image = renderSurface->makeImageSnapshot();
+
// We made/have an off-screen surface. Get the contents as an SkImage:
SkImageInfo info = SkImageInfo::Make(fWidth, fHeight,
fDisplayParams.fColorType,
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698