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

Side by Side Diff: src/views/SkWindow.cpp

Issue 2266763004: Supply a color space in sRGB/F16 mode of SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkWindow.h" 8 #include "SkWindow.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkOSMenu.h" 10 #include "SkOSMenu.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 SkImageInfoIsGammaCorrect(info()) && 345 SkImageInfoIsGammaCorrect(info()) &&
346 (attachmentInfo.fColorBits != 30) 346 (attachmentInfo.fColorBits != 30)
347 ? kSkiaGamma8888_GrPixelConfig : kSkia8888_GrPixelConfig; 347 ? kSkiaGamma8888_GrPixelConfig : kSkia8888_GrPixelConfig;
348 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; 348 desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
349 desc.fSampleCnt = attachmentInfo.fSampleCount; 349 desc.fSampleCnt = attachmentInfo.fSampleCount;
350 desc.fStencilBits = attachmentInfo.fStencilBits; 350 desc.fStencilBits = attachmentInfo.fStencilBits;
351 GrGLint buffer; 351 GrGLint buffer;
352 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer); 352 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
353 desc.fRenderTargetHandle = buffer; 353 desc.fRenderTargetHandle = buffer;
354 354
355 return SkSurface::MakeFromBackendRenderTarget(grContext, desc, &fSurfaceProp s); 355 sk_sp<SkColorSpace> colorSpace =
356 grContext->caps()->srgbSupport() && SkImageInfoIsGammaCorrect(info())
357 ? SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) : nullptr;
358 return SkSurface::MakeFromBackendRenderTarget(grContext, desc, colorSpace, & fSurfaceProps);
356 } 359 }
357 360
358 #endif 361 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698