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

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

Issue 14461006: Plumbed in discard_framebuffer extension (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Removed desktop side changes & validation test Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('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 #include "GrGLContext.h" 10 #include "GrGLContext.h"
(...skipping 25 matching lines...) Expand all
36 fPackFlipYSupport = false; 36 fPackFlipYSupport = false;
37 fTextureUsageSupport = false; 37 fTextureUsageSupport = false;
38 fTexStorageSupport = false; 38 fTexStorageSupport = false;
39 fTextureRedSupport = false; 39 fTextureRedSupport = false;
40 fImagingSupport = false; 40 fImagingSupport = false;
41 fTwoFormatLimit = false; 41 fTwoFormatLimit = false;
42 fFragCoordsConventionSupport = false; 42 fFragCoordsConventionSupport = false;
43 fVertexArrayObjectSupport = false; 43 fVertexArrayObjectSupport = false;
44 fUseNonVBOVertexAndIndexDynamicData = false; 44 fUseNonVBOVertexAndIndexDynamicData = false;
45 fIsCoreProfile = false; 45 fIsCoreProfile = false;
46 fDiscardFBSupport = false;
46 } 47 }
47 48
48 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() { 49 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() {
49 *this = caps; 50 *this = caps;
50 } 51 }
51 52
52 GrGLCaps& GrGLCaps::operator = (const GrGLCaps& caps) { 53 GrGLCaps& GrGLCaps::operator = (const GrGLCaps& caps) {
53 INHERITED::operator=(caps); 54 INHERITED::operator=(caps);
54 fVerifiedColorConfigs = caps.fVerifiedColorConfigs; 55 fVerifiedColorConfigs = caps.fVerifiedColorConfigs;
55 fStencilFormats = caps.fStencilFormats; 56 fStencilFormats = caps.fStencilFormats;
(...skipping 13 matching lines...) Expand all
69 fPackFlipYSupport = caps.fPackFlipYSupport; 70 fPackFlipYSupport = caps.fPackFlipYSupport;
70 fTextureUsageSupport = caps.fTextureUsageSupport; 71 fTextureUsageSupport = caps.fTextureUsageSupport;
71 fTexStorageSupport = caps.fTexStorageSupport; 72 fTexStorageSupport = caps.fTexStorageSupport;
72 fTextureRedSupport = caps.fTextureRedSupport; 73 fTextureRedSupport = caps.fTextureRedSupport;
73 fImagingSupport = caps.fImagingSupport; 74 fImagingSupport = caps.fImagingSupport;
74 fTwoFormatLimit = caps.fTwoFormatLimit; 75 fTwoFormatLimit = caps.fTwoFormatLimit;
75 fFragCoordsConventionSupport = caps.fFragCoordsConventionSupport; 76 fFragCoordsConventionSupport = caps.fFragCoordsConventionSupport;
76 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport; 77 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport;
77 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta; 78 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta;
78 fIsCoreProfile = caps.fIsCoreProfile; 79 fIsCoreProfile = caps.fIsCoreProfile;
80 fDiscardFBSupport = caps.fDiscardFBSupport;
79 81
80 return *this; 82 return *this;
81 } 83 }
82 84
83 void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { 85 void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
84 86
85 this->reset(); 87 this->reset();
86 if (!ctxInfo.isInitialized()) { 88 if (!ctxInfo.isInitialized()) {
87 return; 89 return;
88 } 90 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxIn fo.vendor())) { 189 (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxIn fo.vendor())) {
188 fUseNonVBOVertexAndIndexDynamicData = true; 190 fUseNonVBOVertexAndIndexDynamicData = true;
189 } 191 }
190 192
191 if (kDesktop_GrGLBinding == binding && version >= GR_GL_VER(3, 2)) { 193 if (kDesktop_GrGLBinding == binding && version >= GR_GL_VER(3, 2)) {
192 GrGLint profileMask; 194 GrGLint profileMask;
193 GR_GL_GetIntegerv(gli, GR_GL_CONTEXT_PROFILE_MASK, &profileMask); 195 GR_GL_GetIntegerv(gli, GR_GL_CONTEXT_PROFILE_MASK, &profileMask);
194 fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT); 196 fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT);
195 } 197 }
196 198
199 fDiscardFBSupport = ctxInfo.hasExtension("GL_EXT_discard_framebuffer");
200
197 if (kDesktop_GrGLBinding == binding) { 201 if (kDesktop_GrGLBinding == binding) {
198 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || 202 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) ||
199 ctxInfo.hasExtension("GL_ARB_vertex_array_ob ject"); 203 ctxInfo.hasExtension("GL_ARB_vertex_array_ob ject");
200 } else { 204 } else {
201 fVertexArrayObjectSupport = ctxInfo.hasExtension("GL_OES_vertex_array_ob ject"); 205 fVertexArrayObjectSupport = ctxInfo.hasExtension("GL_OES_vertex_array_ob ject");
202 } 206 }
203 207
204 this->initFSAASupport(ctxInfo, gli); 208 this->initFSAASupport(ctxInfo, gli);
205 this->initStencilFormats(ctxInfo); 209 this->initStencilFormats(ctxInfo);
206 210
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 GrPrintf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO") ); 545 GrPrintf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO") );
542 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); 546 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO"));
543 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 547 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
544 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 548 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
545 GrPrintf("Fragment coord conventions support: %s\n", 549 GrPrintf("Fragment coord conventions support: %s\n",
546 (fFragCoordsConventionSupport ? "YES": "NO")); 550 (fFragCoordsConventionSupport ? "YES": "NO"));
547 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 551 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO"));
548 GrPrintf("Use non-VBO for dynamic data: %s\n", 552 GrPrintf("Use non-VBO for dynamic data: %s\n",
549 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 553 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
550 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); 554 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
555 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO"));
551 } 556 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698