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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1530713002: make alpha read back of bgra/rgba work (Closed) Base URL: https://skia.googlesource.com/skia.git@align
Patch Set: cleanup Created 5 years 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 | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | 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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 GR_GL_GetIntegerv(intf, 990 GR_GL_GetIntegerv(intf,
991 GR_GL_IMPLEMENTATION_COLOR_READ_TYPE, 991 GR_GL_IMPLEMENTATION_COLOR_READ_TYPE,
992 &otherType); 992 &otherType);
993 993
994 return (GrGLenum)otherFormat == format && (GrGLenum)otherType == type; 994 return (GrGLenum)otherFormat == format && (GrGLenum)otherType == type;
995 } 995 }
996 996
997 bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf, 997 bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf,
998 GrGLenum format, 998 GrGLenum format,
999 GrGLenum type, 999 GrGLenum type,
1000 GrGLenum currFboFormat) const { 1000 GrPixelConfig currRTConfig) const {
1001 ReadPixelsSupportedFormat key = {format, type, currFboFormat}; 1001 ReadPixelsSupportedFormat key = {format, type, currRTConfig};
1002 if (const bool* supported = fReadPixelsSupportedCache.find(key)) { 1002 if (const bool* supported = fReadPixelsSupportedCache.find(key)) {
1003 return *supported; 1003 return *supported;
1004 } 1004 }
1005 bool supported = this->doReadPixelsSupported(intf, format, type); 1005 bool supported = this->doReadPixelsSupported(intf, format, type);
1006 fReadPixelsSupportedCache.set(key, supported); 1006 fReadPixelsSupportedCache.set(key, supported);
1007 return supported; 1007 return supported;
1008 } 1008 }
1009 1009
1010 void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa ce* gli) { 1010 void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa ce* gli) {
1011 1011
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; 1348 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr";
1349 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; 1349 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba";
1350 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; 1350 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba";
1351 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; 1351 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba";
1352 1352
1353 } 1353 }
1354 1354
1355 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1355 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
1356 1356
1357 1357
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698