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

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

Issue 1418473004: Allow max tile size to be overridden separately from max texture size. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix comment spelling 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 | « include/gpu/GrContextOptions.h ('k') | src/gpu/SkGpuDevice.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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 fSupressPrints = options.fSuppressPrints; 114 fSupressPrints = options.fSuppressPrints;
115 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 115 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
116 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 116 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
117 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite; 117 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
118 118
119 fPreferVRAMUseOverFlushes = true; 119 fPreferVRAMUseOverFlushes = true;
120 } 120 }
121 121
122 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { 122 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
123 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); 123 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
124 // If the max tile override is zero, it means we should use the max texture size.
125 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText ureSize) {
126 fMaxTileSize = fMaxTextureSize;
127 } else {
128 fMaxTileSize = options.fMaxTileSizeOverride;
129 }
124 } 130 }
125 131
126 static SkString map_flags_to_string(uint32_t flags) { 132 static SkString map_flags_to_string(uint32_t flags) {
127 SkString str; 133 SkString str;
128 if (GrCaps::kNone_MapFlags == flags) { 134 if (GrCaps::kNone_MapFlags == flags) {
129 str = "none"; 135 str = "none";
130 } else { 136 } else {
131 SkASSERT(GrCaps::kCanMap_MapFlag & flags); 137 SkASSERT(GrCaps::kCanMap_MapFlag & flags);
132 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag); 138 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag);
133 str = "can_map"; 139 str = "can_map";
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 241 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
236 242
237 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 243 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
238 r.appendf("%s is uploadable to a texture: %s\n", 244 r.appendf("%s is uploadable to a texture: %s\n",
239 kConfigNames[i], 245 kConfigNames[i],
240 gNY[fConfigTextureSupport[i]]); 246 gNY[fConfigTextureSupport[i]]);
241 } 247 }
242 248
243 return r; 249 return r;
244 } 250 }
OLDNEW
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698