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

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

Issue 2253293003: Revert of Reduce window rectangles cap to 8 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | src/gpu/GrWindowRectangles.h » ('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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #include "GrCaps.h" 8 #include "GrCaps.h"
9 #include "GrContextOptions.h" 9 #include "GrContextOptions.h"
10 #include "GrWindowRectangles.h" 10 #include "GrWindowRectangles.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { 134 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
135 this->onApplyOptionsOverrides(options); 135 this->onApplyOptionsOverrides(options);
136 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); 136 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
137 // If the max tile override is zero, it means we should use the max texture size. 137 // If the max tile override is zero, it means we should use the max texture size.
138 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText ureSize) { 138 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText ureSize) {
139 fMaxTileSize = fMaxTextureSize; 139 fMaxTileSize = fMaxTextureSize;
140 } else { 140 } else {
141 fMaxTileSize = options.fMaxTileSizeOverride; 141 fMaxTileSize = options.fMaxTileSizeOverride;
142 } 142 }
143 if (fMaxWindowRectangles > GrWindowRectangles::kMaxWindows) { 143 if (fMaxWindowRectangles > GrWindowRectangles::kMaxWindows) {
144 SkDebugf("WARNING: capping window rectangles at %i. HW advertises suppor t for %i.\n",
145 GrWindowRectangles::kMaxWindows, fMaxWindowRectangles);
146 fMaxWindowRectangles = GrWindowRectangles::kMaxWindows; 144 fMaxWindowRectangles = GrWindowRectangles::kMaxWindows;
147 } 145 }
148 } 146 }
149 147
150 static SkString map_flags_to_string(uint32_t flags) { 148 static SkString map_flags_to_string(uint32_t flags) {
151 SkString str; 149 SkString str;
152 if (GrCaps::kNone_MapFlags == flags) { 150 if (GrCaps::kNone_MapFlags == flags) {
153 str = "none"; 151 str = "none";
154 } else { 152 } else {
155 SkASSERT(GrCaps::kCanMap_MapFlag & flags); 153 SkASSERT(GrCaps::kCanMap_MapFlag & flags);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 285
288 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 286 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
289 GrPixelConfig config = static_cast<GrPixelConfig>(i); 287 GrPixelConfig config = static_cast<GrPixelConfig>(i);
290 r.appendf("%s is uploadable to a texture: %s\n", 288 r.appendf("%s is uploadable to a texture: %s\n",
291 kConfigNames[i], 289 kConfigNames[i],
292 gNY[this->isConfigTexturable(config)]); 290 gNY[this->isConfigTexturable(config)]);
293 } 291 }
294 292
295 return r; 293 return r;
296 } 294 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrWindowRectangles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698