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

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

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: vulkan Created 4 years, 9 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 fMaxRenderTargetSize = 1; 109 fMaxRenderTargetSize = 1;
110 fMaxTextureSize = 1; 110 fMaxTextureSize = 1;
111 fMaxColorSampleCount = 0; 111 fMaxColorSampleCount = 0;
112 fMaxStencilSampleCount = 0; 112 fMaxStencilSampleCount = 0;
113 fMaxRasterSamples = 0; 113 fMaxRasterSamples = 0;
114 114
115 fSuppressPrints = options.fSuppressPrints; 115 fSuppressPrints = options.fSuppressPrints;
116 fImmediateFlush = options.fImmediateMode; 116 fImmediateFlush = options.fImmediateMode;
117 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 117 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
118 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 118 fBufferMapThreshold = options.fBufferMapThreshold;
119 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite; 119 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
120 fUseDrawInsteadOfAllRenderTargetWrites = false; 120 fUseDrawInsteadOfAllRenderTargetWrites = false;
121 121
122 fPreferVRAMUseOverFlushes = true; 122 fPreferVRAMUseOverFlushes = true;
123 } 123 }
124 124
125 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { 125 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
126 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); 126 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
127 // If the max tile override is zero, it means we should use the max texture size. 127 // If the max tile override is zero, it means we should use the max texture size.
128 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText ureSize) { 128 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText ureSize) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 255 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
256 GrPixelConfig config = static_cast<GrPixelConfig>(i); 256 GrPixelConfig config = static_cast<GrPixelConfig>(i);
257 r.appendf("%s is uploadable to a texture: %s\n", 257 r.appendf("%s is uploadable to a texture: %s\n",
258 kConfigNames[i], 258 kConfigNames[i],
259 gNY[this->isConfigTexturable(config)]); 259 gNY[this->isConfigTexturable(config)]);
260 } 260 }
261 261
262 return r; 262 return r;
263 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698