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

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

Issue 1158963002: Add caps overrides to GMs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tiny 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
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 fMaxTextureSize = 0; 96 fMaxTextureSize = 0;
97 fMaxSampleCount = 0; 97 fMaxSampleCount = 0;
98 98
99 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 99 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
100 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); 100 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
101 101
102 fSupressPrints = options.fSuppressPrints; 102 fSupressPrints = options.fSuppressPrints;
103 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 103 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
104 } 104 }
105 105
106 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
Chris Dalton 2015/05/27 19:57:13 Do we want a similar method on the shader caps, or
bsalomon 2015/05/27 20:17:33 I think we'd do it here as well. I added a stub fu
107 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
108 }
109
106 static SkString map_flags_to_string(uint32_t flags) { 110 static SkString map_flags_to_string(uint32_t flags) {
107 SkString str; 111 SkString str;
108 if (GrCaps::kNone_MapFlags == flags) { 112 if (GrCaps::kNone_MapFlags == flags) {
109 str = "none"; 113 str = "none";
110 } else { 114 } else {
111 SkASSERT(GrCaps::kCanMap_MapFlag & flags); 115 SkASSERT(GrCaps::kCanMap_MapFlag & flags);
112 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag); 116 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag);
113 str = "can_map"; 117 str = "can_map";
114 118
115 if (GrCaps::kSubset_MapFlag & flags) { 119 if (GrCaps::kSubset_MapFlag & flags) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 208 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
205 209
206 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 210 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
207 r.appendf("%s is uploadable to a texture: %s\n", 211 r.appendf("%s is uploadable to a texture: %s\n",
208 kConfigNames[i], 212 kConfigNames[i],
209 gNY[fConfigTextureSupport[i]]); 213 gNY[fConfigTextureSupport[i]]);
210 } 214 }
211 215
212 return r; 216 return r;
213 } 217 }
OLDNEW
« gm/bleed.cpp ('K') | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698