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

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

Issue 1430643002: Remove min texture size support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Delete even more! Created 5 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
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/gpu/GrGpu.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 fUseDrawInsteadOfClear = false; 100 fUseDrawInsteadOfClear = false;
101 101
102 fBlendEquationSupport = kBasic_BlendEquationSupport; 102 fBlendEquationSupport = kBasic_BlendEquationSupport;
103 fAdvBlendEqBlacklist = 0; 103 fAdvBlendEqBlacklist = 0;
104 104
105 fMapBufferFlags = kNone_MapFlags; 105 fMapBufferFlags = kNone_MapFlags;
106 106
107 fMaxRenderTargetSize = 1; 107 fMaxRenderTargetSize = 1;
108 fMaxTextureSize = 1; 108 fMaxTextureSize = 1;
109 fMinTextureSize = 1;
110 fMaxSampleCount = 0; 109 fMaxSampleCount = 0;
111 110
112 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 111 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
113 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); 112 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
114 113
115 fSupressPrints = options.fSuppressPrints; 114 fSupressPrints = options.fSuppressPrints;
116 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 115 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
117 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 116 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
118 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite; 117 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
119 118
120 fPreferVRAMUseOverFlushes = true; 119 fPreferVRAMUseOverFlushes = true;
121 } 120 }
122 121
123 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { 122 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
124 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); 123 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
125 fMinTextureSize = SkTMax(fMinTextureSize, options.fMinTextureSizeOverride);
126 } 124 }
127 125
128 static SkString map_flags_to_string(uint32_t flags) { 126 static SkString map_flags_to_string(uint32_t flags) {
129 SkString str; 127 SkString str;
130 if (GrCaps::kNone_MapFlags == flags) { 128 if (GrCaps::kNone_MapFlags == flags) {
131 str = "none"; 129 str = "none";
132 } else { 130 } else {
133 SkASSERT(GrCaps::kCanMap_MapFlag & flags); 131 SkASSERT(GrCaps::kCanMap_MapFlag & flags);
134 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag); 132 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag);
135 str = "can_map"; 133 str = "can_map";
(...skipping 29 matching lines...) Expand all
165 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]); 163 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]);
166 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", 164 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
167 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); 165 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]);
168 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]); 166 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]);
169 167
170 if (this->advancedBlendEquationSupport()) { 168 if (this->advancedBlendEquationSupport()) {
171 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist); 169 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist);
172 } 170 }
173 171
174 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 172 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
175 r.appendf("Min Texture Size : %d\n", fMinTextureSize);
176 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ; 173 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ;
177 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); 174 r.appendf("Max Sample Count : %d\n", fMaxSampleCount);
178 175
179 static const char* kBlendEquationSupportNames[] = { 176 static const char* kBlendEquationSupportNames[] = {
180 "Basic", 177 "Basic",
181 "Advanced", 178 "Advanced",
182 "Advanced Coherent", 179 "Advanced Coherent",
183 }; 180 };
184 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport); 181 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport);
185 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport); 182 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 235 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
239 236
240 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 237 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
241 r.appendf("%s is uploadable to a texture: %s\n", 238 r.appendf("%s is uploadable to a texture: %s\n",
242 kConfigNames[i], 239 kConfigNames[i],
243 gNY[fConfigTextureSupport[i]]); 240 gNY[fConfigTextureSupport[i]]);
244 } 241 }
245 242
246 return r; 243 return r;
247 } 244 }
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698