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

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

Issue 1017803002: Revert of Improve tracking of bound FBOs in GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 fTwoFormatLimit = false; 45 fTwoFormatLimit = false;
46 fFragCoordsConventionSupport = false; 46 fFragCoordsConventionSupport = false;
47 fVertexArrayObjectSupport = false; 47 fVertexArrayObjectSupport = false;
48 fES2CompatibilitySupport = false; 48 fES2CompatibilitySupport = false;
49 fUseNonVBOVertexAndIndexDynamicData = false; 49 fUseNonVBOVertexAndIndexDynamicData = false;
50 fIsCoreProfile = false; 50 fIsCoreProfile = false;
51 fFullClearIsFree = false; 51 fFullClearIsFree = false;
52 fDropsTileOnZeroDivide = false; 52 fDropsTileOnZeroDivide = false;
53 fFBFetchSupport = false; 53 fFBFetchSupport = false;
54 fFBFetchNeedsCustomOutput = false; 54 fFBFetchNeedsCustomOutput = false;
55 fPreferBindingToReadAndDrawFramebuffer = false;
56
57 fFBFetchColorName = NULL; 55 fFBFetchColorName = NULL;
58 fFBFetchExtensionString = NULL; 56 fFBFetchExtensionString = NULL;
59 57
60 fReadPixelsSupportedCache.reset(); 58 fReadPixelsSupportedCache.reset();
61 } 59 }
62 60
63 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() { 61 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() {
64 *this = caps; 62 *this = caps;
65 } 63 }
66 64
(...skipping 27 matching lines...) Expand all
94 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport; 92 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport;
95 fES2CompatibilitySupport = caps.fES2CompatibilitySupport; 93 fES2CompatibilitySupport = caps.fES2CompatibilitySupport;
96 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta; 94 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta;
97 fIsCoreProfile = caps.fIsCoreProfile; 95 fIsCoreProfile = caps.fIsCoreProfile;
98 fFullClearIsFree = caps.fFullClearIsFree; 96 fFullClearIsFree = caps.fFullClearIsFree;
99 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide; 97 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide;
100 fFBFetchSupport = caps.fFBFetchSupport; 98 fFBFetchSupport = caps.fFBFetchSupport;
101 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput; 99 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput;
102 fFBFetchColorName = caps.fFBFetchColorName; 100 fFBFetchColorName = caps.fFBFetchColorName;
103 fFBFetchExtensionString = caps.fFBFetchExtensionString; 101 fFBFetchExtensionString = caps.fFBFetchExtensionString;
104 fPreferBindingToReadAndDrawFramebuffer = caps.fPreferBindingToReadAndDrawFra mebuffer;
105 102
106 return *this; 103 return *this;
107 } 104 }
108 105
109 bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { 106 bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
110 107
111 this->reset(); 108 this->reset();
112 if (!ctxInfo.isInitialized()) { 109 if (!ctxInfo.isInitialized()) {
113 return false; 110 return false;
114 } 111 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch"; 272 fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch";
276 } 273 }
277 } 274 }
278 275
279 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader 276 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader
280 fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); 277 fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor();
281 278
282 this->initFSAASupport(ctxInfo, gli); 279 this->initFSAASupport(ctxInfo, gli);
283 this->initStencilFormats(ctxInfo); 280 this->initStencilFormats(ctxInfo);
284 281
285 // Workaround for Mac/Chromium issue.
286 #ifdef SK_BUILD_FOR_MAC
287 // This relies on the fact that initFSAASupport() was already called.
288 fPreferBindingToReadAndDrawFramebuffer = ctxInfo.isChromium() && this->usesM SAARenderBuffers();
289 #endif
290
291 /************************************************************************** 282 /**************************************************************************
292 * GrDrawTargetCaps fields 283 * GrDrawTargetCaps fields
293 **************************************************************************/ 284 **************************************************************************/
294 if (kGL_GrGLStandard == standard) { 285 if (kGL_GrGLStandard == standard) {
295 // we could also look for GL_ATI_separate_stencil extension or 286 // we could also look for GL_ATI_separate_stencil extension or
296 // GL_EXT_stencil_two_side but they use different function signatures 287 // GL_EXT_stencil_two_side but they use different function signatures
297 // than GL2.0+ (and than each other). 288 // than GL2.0+ (and than each other).
298 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); 289 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0));
299 // supported on GL 1.4 and higher or by extension 290 // supported on GL 1.4 and higher or by extension
300 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || 291 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) ||
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 1048 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
1058 r.appendf("Fragment coord conventions support: %s\n", 1049 r.appendf("Fragment coord conventions support: %s\n",
1059 (fFragCoordsConventionSupport ? "YES": "NO")); 1050 (fFragCoordsConventionSupport ? "YES": "NO"));
1060 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); 1051 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
1061 r.appendf("Use non-VBO for dynamic data: %s\n", 1052 r.appendf("Use non-VBO for dynamic data: %s\n",
1062 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 1053 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
1063 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); 1054 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO "));
1064 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); 1055 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO"));
1065 return r; 1056 return r;
1066 } 1057 }
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