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

Unified Diff: src/gpu/GrTest.cpp

Issue 1300813007: wire up reduced atlas and zero textblob cache to test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrTest.cpp
diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp
index a2efb4829beee513b07ff84a46dcdc655e16aa50..aeae2f6624f9640f8660999a9d5c6690f36062ec 100644
--- a/src/gpu/GrTest.cpp
+++ b/src/gpu/GrTest.cpp
@@ -8,6 +8,7 @@
#include "GrTest.h"
+#include "GrBatchAtlas.h"
#include "GrBatchFontCache.h"
#include "GrBufferedDrawTarget.h"
#include "GrContextOptions.h"
@@ -16,6 +17,28 @@
#include "GrTextBlobCache.h"
#include "SkString.h"
+namespace GrTest {
+void SetupAlwaysEvictAtlas(GrContext* context) {
+ GrBatchAtlasConfig configs[3];
+ configs[kA8_GrMaskFormat].fWidth = 256;
bsalomon 2015/08/19 19:54:17 comments about why these numbers?
+ configs[kA8_GrMaskFormat].fHeight = 256;
+ configs[kA8_GrMaskFormat].fPlotWidth = 256;
+ configs[kA8_GrMaskFormat].fPlotHeight = 256;
+
+ configs[kA565_GrMaskFormat].fWidth = 256;
+ configs[kA565_GrMaskFormat].fHeight = 256;
+ configs[kA565_GrMaskFormat].fPlotWidth = 256;
+ configs[kA565_GrMaskFormat].fPlotHeight = 256;
+
+ configs[kARGB_GrMaskFormat].fWidth = 256;
+ configs[kARGB_GrMaskFormat].fHeight = 256;
+ configs[kARGB_GrMaskFormat].fPlotWidth = 256;
+ configs[kARGB_GrMaskFormat].fPlotHeight = 256;
+
+ context->setTextContextAtlasSizes_ForTesting(configs);
+}
+};
+
void GrTestTarget::init(GrContext* ctx, GrDrawTarget* target) {
SkASSERT(!fContext);
« src/gpu/GrTest.h ('K') | « src/gpu/GrTest.h ('k') | src/gpu/GrTextBlobCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698