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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrCaps.cpp
diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp
index 4095f1ab10e016404d02d894513b2113b97535ed..75cecdfb8c0b8d00111b2f3ed37e0be9fae0dcbd 100644
--- a/src/gpu/GrCaps.cpp
+++ b/src/gpu/GrCaps.cpp
@@ -121,6 +121,12 @@ GrCaps::GrCaps(const GrContextOptions& options) {
void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
+ // If the max tile override is zero, it means we should use the max texture size.
+ if (!options.fMaxTileSizeOverride || options.fMaxTileSizeOverride > fMaxTextureSize) {
+ fMaxTileSize = fMaxTextureSize;
+ } else {
+ fMaxTileSize = options.fMaxTileSizeOverride;
+ }
}
static SkString map_flags_to_string(uint32_t flags) {
« 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