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

Unified Diff: src/gpu/batches/GrAADistanceFieldPathRenderer.cpp

Issue 1345823002: Update params to get better packing for DF path atlas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Re-enable DF paths Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
index 45a3d65179c916ad1d4727975ea0b42ba81bb9c5..f06553c2d8e069b13fe483f06e35e3734fb1ea6a 100644
--- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
@@ -23,9 +23,9 @@
#include "SkDistanceFieldGen.h"
#include "SkRTConf.h"
-#define ATLAS_TEXTURE_WIDTH 1024
+#define ATLAS_TEXTURE_WIDTH 2048
#define ATLAS_TEXTURE_HEIGHT 2048
-#define PLOT_WIDTH 256
+#define PLOT_WIDTH 512
#define PLOT_HEIGHT 256
#define NUM_PLOTS_X (ATLAS_TEXTURE_WIDTH / PLOT_WIDTH)
@@ -38,8 +38,8 @@ static int g_NumFreedPaths = 0;
// mip levels
static const int kSmallMIP = 32;
-static const int kMediumMIP = 78;
-static const int kLargeMIP = 192;
+static const int kMediumMIP = 72;
+static const int kLargeMIP = 162;
// Callback to clear out internal path cache when eviction occurs
void GrAADistanceFieldPathRenderer::HandleEviction(GrBatchAtlas::AtlasID id, void* pr) {
@@ -82,7 +82,7 @@ GrAADistanceFieldPathRenderer::~GrAADistanceFieldPathRenderer() {
////////////////////////////////////////////////////////////////////////////////
bool GrAADistanceFieldPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
-
+
// TODO: Support inverse fill
// TODO: Support strokes
if (!args.fShaderCaps->shaderDerivativeSupport() || !args.fAntiAlias ||
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698