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

Side by Side Diff: src/gpu/GrCaps.cpp

Issue 1173203005: Work around for nexus 6 TexSubImage issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 6 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 | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrContext.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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrCaps.h" 9 #include "GrCaps.h"
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 fMaxTextureSize = 0; 102 fMaxTextureSize = 0;
103 fMinTextureSize = 0; 103 fMinTextureSize = 0;
104 fMaxSampleCount = 0; 104 fMaxSampleCount = 0;
105 105
106 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 106 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
107 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); 107 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
108 108
109 fSupressPrints = options.fSuppressPrints; 109 fSupressPrints = options.fSuppressPrints;
110 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 110 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
111 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 111 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
112 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
112 } 113 }
113 114
114 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { 115 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
115 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); 116 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
116 fMinTextureSize = SkTMax(fMinTextureSize, options.fMinTextureSizeOverride); 117 fMinTextureSize = SkTMax(fMinTextureSize, options.fMinTextureSizeOverride);
117 } 118 }
118 119
119 static SkString map_flags_to_string(uint32_t flags) { 120 static SkString map_flags_to_string(uint32_t flags) {
120 SkString str; 121 SkString str;
121 if (GrCaps::kNone_MapFlags == flags) { 122 if (GrCaps::kNone_MapFlags == flags) {
(...skipping 21 matching lines...) Expand all
143 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS upport]); 144 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS upport]);
144 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS upport]); 145 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS upport]);
145 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]); 146 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]);
146 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]); 147 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]);
147 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]); 148 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]);
148 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]); 149 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]);
149 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]); 150 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]);
150 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]); 151 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]);
151 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]); 152 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]);
152 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]); 153 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]);
154 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
155 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]);
153 if (this->advancedBlendEquationSupport()) { 156 if (this->advancedBlendEquationSupport()) {
154 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist); 157 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist);
155 } 158 }
156 159
157 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 160 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
158 r.appendf("Min Texture Size : %d\n", fMinTextureSize); 161 r.appendf("Min Texture Size : %d\n", fMinTextureSize);
159 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ; 162 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ;
160 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); 163 r.appendf("Max Sample Count : %d\n", fMaxSampleCount);
161 164
162 static const char* kBlendEquationSupportNames[] = { 165 static const char* kBlendEquationSupportNames[] = {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 224 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
222 225
223 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 226 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
224 r.appendf("%s is uploadable to a texture: %s\n", 227 r.appendf("%s is uploadable to a texture: %s\n",
225 kConfigNames[i], 228 kConfigNames[i],
226 gNY[fConfigTextureSupport[i]]); 229 gNY[fConfigTextureSupport[i]]);
227 } 230 }
228 231
229 return r; 232 return r;
230 } 233 }
OLDNEW
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698