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

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

Issue 2254013002: Reduce window rectangles cap to 8 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reduce window rectangles cap to 8 Created 4 years, 3 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);
144 fMaxWindowRectangles = GrWindowRectangles::kMaxWindows; 146 fMaxWindowRectangles = GrWindowRectangles::kMaxWindows;
145 } 147 }
146 } 148 }
147 149
148 static SkString map_flags_to_string(uint32_t flags) { 150 static SkString map_flags_to_string(uint32_t flags) {
149 SkString str; 151 SkString str;
150 if (GrCaps::kNone_MapFlags == flags) { 152 if (GrCaps::kNone_MapFlags == flags) {
151 str = "none"; 153 str = "none";
152 } else { 154 } else {
153 SkASSERT(GrCaps::kCanMap_MapFlag & flags); 155 SkASSERT(GrCaps::kCanMap_MapFlag & flags);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 287
286 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 288 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
287 GrPixelConfig config = static_cast<GrPixelConfig>(i); 289 GrPixelConfig config = static_cast<GrPixelConfig>(i);
288 r.appendf("%s is uploadable to a texture: %s\n", 290 r.appendf("%s is uploadable to a texture: %s\n",
289 kConfigNames[i], 291 kConfigNames[i],
290 gNY[this->isConfigTexturable(config)]); 292 gNY[this->isConfigTexturable(config)]);
291 } 293 }
292 294
293 return r; 295 return r;
294 } 296 }
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