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

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

Issue 53823003: Add can-ignore-rect hint to clear call (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up Created 7 years, 1 month 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
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 30 matching lines...) Expand all
41 fTexStorageSupport = false; 41 fTexStorageSupport = false;
42 fTextureRedSupport = false; 42 fTextureRedSupport = false;
43 fImagingSupport = false; 43 fImagingSupport = false;
44 fTwoFormatLimit = false; 44 fTwoFormatLimit = false;
45 fFragCoordsConventionSupport = false; 45 fFragCoordsConventionSupport = false;
46 fVertexArrayObjectSupport = false; 46 fVertexArrayObjectSupport = false;
47 fUseNonVBOVertexAndIndexDynamicData = false; 47 fUseNonVBOVertexAndIndexDynamicData = false;
48 fIsCoreProfile = false; 48 fIsCoreProfile = false;
49 fFixedFunctionSupport = false; 49 fFixedFunctionSupport = false;
50 fDiscardFBSupport = false; 50 fDiscardFBSupport = false;
51 fFullClearIsFree = false;
51 } 52 }
52 53
53 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() { 54 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() {
54 *this = caps; 55 *this = caps;
55 } 56 }
56 57
57 GrGLCaps& GrGLCaps::operator = (const GrGLCaps& caps) { 58 GrGLCaps& GrGLCaps::operator = (const GrGLCaps& caps) {
58 INHERITED::operator=(caps); 59 INHERITED::operator=(caps);
59 fVerifiedColorConfigs = caps.fVerifiedColorConfigs; 60 fVerifiedColorConfigs = caps.fVerifiedColorConfigs;
60 fStencilFormats = caps.fStencilFormats; 61 fStencilFormats = caps.fStencilFormats;
(...skipping 16 matching lines...) Expand all
77 fTexStorageSupport = caps.fTexStorageSupport; 78 fTexStorageSupport = caps.fTexStorageSupport;
78 fTextureRedSupport = caps.fTextureRedSupport; 79 fTextureRedSupport = caps.fTextureRedSupport;
79 fImagingSupport = caps.fImagingSupport; 80 fImagingSupport = caps.fImagingSupport;
80 fTwoFormatLimit = caps.fTwoFormatLimit; 81 fTwoFormatLimit = caps.fTwoFormatLimit;
81 fFragCoordsConventionSupport = caps.fFragCoordsConventionSupport; 82 fFragCoordsConventionSupport = caps.fFragCoordsConventionSupport;
82 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport; 83 fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport;
83 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta; 84 fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicDa ta;
84 fIsCoreProfile = caps.fIsCoreProfile; 85 fIsCoreProfile = caps.fIsCoreProfile;
85 fFixedFunctionSupport = caps.fFixedFunctionSupport; 86 fFixedFunctionSupport = caps.fFixedFunctionSupport;
86 fDiscardFBSupport = caps.fDiscardFBSupport; 87 fDiscardFBSupport = caps.fDiscardFBSupport;
88 fFullClearIsFree = caps.fFullClearIsFree;
87 89
88 return *this; 90 return *this;
89 } 91 }
90 92
91 void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { 93 void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
92 94
93 this->reset(); 95 this->reset();
94 if (!ctxInfo.isInitialized()) { 96 if (!ctxInfo.isInitialized()) {
95 return; 97 return;
96 } 98 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // frequently changing VBOs. We've measured a performance increase using non -VBO vertex 219 // frequently changing VBOs. We've measured a performance increase using non -VBO vertex
218 // data for dynamic content on these GPUs. Perhaps we should read the render er string and 220 // data for dynamic content on these GPUs. Perhaps we should read the render er string and
219 // limit this decision to specific GPU families rather than basing it on the vendor alone. 221 // limit this decision to specific GPU families rather than basing it on the vendor alone.
220 if (!GR_GL_MUST_USE_VBO && 222 if (!GR_GL_MUST_USE_VBO &&
221 (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxIn fo.vendor())) { 223 (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxIn fo.vendor())) {
222 fUseNonVBOVertexAndIndexDynamicData = true; 224 fUseNonVBOVertexAndIndexDynamicData = true;
223 } 225 }
224 226
225 fDiscardFBSupport = ctxInfo.hasExtension("GL_EXT_discard_framebuffer"); 227 fDiscardFBSupport = ctxInfo.hasExtension("GL_EXT_discard_framebuffer");
226 228
229 if (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxInf o.vendor()) {
230 fFullClearIsFree = true;
231 }
232
227 if (kDesktop_GrGLBinding == binding) { 233 if (kDesktop_GrGLBinding == binding) {
228 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || 234 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) ||
229 ctxInfo.hasExtension("GL_ARB_vertex_array_ob ject"); 235 ctxInfo.hasExtension("GL_ARB_vertex_array_ob ject");
230 } else { 236 } else {
231 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || 237 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) ||
232 ctxInfo.hasExtension("GL_OES_vertex_array_ob ject"); 238 ctxInfo.hasExtension("GL_OES_vertex_array_ob ject");
233 } 239 }
234 240
235 if (kES_GrGLBinding == binding) { 241 if (kES_GrGLBinding == binding) {
236 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { 242 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 GrPrintf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO") ); 647 GrPrintf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO") );
642 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); 648 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO"));
643 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 649 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
644 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 650 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
645 GrPrintf("Fragment coord conventions support: %s\n", 651 GrPrintf("Fragment coord conventions support: %s\n",
646 (fFragCoordsConventionSupport ? "YES": "NO")); 652 (fFragCoordsConventionSupport ? "YES": "NO"));
647 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 653 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO"));
648 GrPrintf("Use non-VBO for dynamic data: %s\n", 654 GrPrintf("Use non-VBO for dynamic data: %s\n",
649 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 655 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
650 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO")); 656 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO"));
657 GrPrintf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO" ));
651 } 658 }
OLDNEW
« src/gpu/GrDrawTarget.h ('K') | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698