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

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: asserts 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
« no previous file with comments | « src/gpu/GrBufferAllocPool.cpp ('k') | src/gpu/GrDrawTarget.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 /* 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 fMaxVertexAttributes = 0; 109 fMaxVertexAttributes = 0;
110 fMaxRenderTargetSize = 1; 110 fMaxRenderTargetSize = 1;
111 fMaxTextureSize = 1; 111 fMaxTextureSize = 1;
112 fMaxColorSampleCount = 0; 112 fMaxColorSampleCount = 0;
113 fMaxStencilSampleCount = 0; 113 fMaxStencilSampleCount = 0;
114 fMaxRasterSamples = 0; 114 fMaxRasterSamples = 0;
115 115
116 fSuppressPrints = options.fSuppressPrints; 116 fSuppressPrints = options.fSuppressPrints;
117 fImmediateFlush = options.fImmediateMode; 117 fImmediateFlush = options.fImmediateMode;
118 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 118 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
119 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 119 fBufferMapThreshold = options.fBufferMapThreshold;
120 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite; 120 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
121 fUseDrawInsteadOfAllRenderTargetWrites = false; 121 fUseDrawInsteadOfAllRenderTargetWrites = false;
122 122
123 fPreferVRAMUseOverFlushes = true; 123 fPreferVRAMUseOverFlushes = true;
124 } 124 }
125 125
126 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { 126 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
127 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); 127 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
128 // If the max tile override is zero, it means we should use the max texture size. 128 // If the max tile override is zero, it means we should use the max texture size.
129 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText ureSize) { 129 if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxText ureSize) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 257 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
258 GrPixelConfig config = static_cast<GrPixelConfig>(i); 258 GrPixelConfig config = static_cast<GrPixelConfig>(i);
259 r.appendf("%s is uploadable to a texture: %s\n", 259 r.appendf("%s is uploadable to a texture: %s\n",
260 kConfigNames[i], 260 kConfigNames[i],
261 gNY[this->isConfigTexturable(config)]); 261 gNY[this->isConfigTexturable(config)]);
262 } 262 }
263 263
264 return r; 264 return r;
265 } 265 }
OLDNEW
« no previous file with comments | « src/gpu/GrBufferAllocPool.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698