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

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

Issue 1592803002: Differentiate maxColorSamples and maxStencilSamples in GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 fUseDrawInsteadOfClear = false; 98 fUseDrawInsteadOfClear = false;
99 99
100 fBlendEquationSupport = kBasic_BlendEquationSupport; 100 fBlendEquationSupport = kBasic_BlendEquationSupport;
101 fAdvBlendEqBlacklist = 0; 101 fAdvBlendEqBlacklist = 0;
102 102
103 fMapBufferFlags = kNone_MapFlags; 103 fMapBufferFlags = kNone_MapFlags;
104 104
105 fMaxRenderTargetSize = 1; 105 fMaxRenderTargetSize = 1;
106 fMaxTextureSize = 1; 106 fMaxTextureSize = 1;
107 fMaxSampleCount = 0; 107 fMaxColorSampleCount = 0;
108 fMaxStencilSampleCount = 0;
108 109
109 fSuppressPrints = options.fSuppressPrints; 110 fSuppressPrints = options.fSuppressPrints;
110 fImmediateFlush = options.fImmediateMode; 111 fImmediateFlush = options.fImmediateMode;
111 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 112 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
112 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 113 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
113 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite; 114 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
114 115
115 fPreferVRAMUseOverFlushes = true; 116 fPreferVRAMUseOverFlushes = true;
116 } 117 }
117 118
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", 169 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
169 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); 170 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]);
170 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]); 171 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]);
171 172
172 if (this->advancedBlendEquationSupport()) { 173 if (this->advancedBlendEquationSupport()) {
173 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist); 174 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist);
174 } 175 }
175 176
176 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 177 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
177 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ; 178 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ;
178 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); 179 r.appendf("Max Color Sample Count : %d\n", fMaxColorSampleCount) ;
180 r.appendf("Max Stencil Sample Count : %d\n", fMaxStencilSampleCoun t);
179 181
180 static const char* kBlendEquationSupportNames[] = { 182 static const char* kBlendEquationSupportNames[] = {
181 "Basic", 183 "Basic",
182 "Advanced", 184 "Advanced",
183 "Advanced Coherent", 185 "Advanced Coherent",
184 }; 186 };
185 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport); 187 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport);
186 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport); 188 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport);
187 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport); 189 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport);
188 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq uationSupport + 1); 190 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq uationSupport + 1);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 243
242 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 244 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
243 GrPixelConfig config = static_cast<GrPixelConfig>(i); 245 GrPixelConfig config = static_cast<GrPixelConfig>(i);
244 r.appendf("%s is uploadable to a texture: %s\n", 246 r.appendf("%s is uploadable to a texture: %s\n",
245 kConfigNames[i], 247 kConfigNames[i],
246 gNY[this->isConfigTexturable(config)]); 248 gNY[this->isConfigTexturable(config)]);
247 } 249 }
248 250
249 return r; 251 return r;
250 } 252 }
OLDNEW
« no previous file with comments | « include/gpu/GrCaps.h ('k') | src/gpu/GrContext.cpp » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698