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

Unified Diff: src/gpu/GrAADistanceFieldPathRenderer.h

Issue 975303005: Creation of GrBatchAtlas and Distancefieldpathrenderer batch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAADistanceFieldPathRenderer.h
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.h b/src/gpu/GrAADistanceFieldPathRenderer.h
index c145e2fe3f201b6ced83ed3cbc388c37db063dd6..6d7c38d6c3cfc5a68d3da8d8556522e57f4a9990 100755
--- a/src/gpu/GrAADistanceFieldPathRenderer.h
+++ b/src/gpu/GrAADistanceFieldPathRenderer.h
@@ -9,7 +9,7 @@
#ifndef GrAADistanceFieldPathRenderer_DEFINED
#define GrAADistanceFieldPathRenderer_DEFINED
-#include "GrAtlas.h"
+#include "GrBatchAtlas.h"
#include "GrPathRenderer.h"
#include "GrRect.h"
@@ -17,7 +17,6 @@
#include "SkTDynamicHash.h"
class GrContext;
-class GrPlot;
class GrAADistanceFieldPathRenderer : public GrPathRenderer {
public:
@@ -55,11 +54,11 @@ private:
return other.fGenID == fGenID && other.fDimension == fDimension;
}
};
- Key fKey;
- SkScalar fScale;
- GrPlot* fPlot;
- SkRect fBounds;
- SkIPoint16 fAtlasLocation;
+ Key fKey;
+ SkScalar fScale;
+ GrBatchAtlas::AtlasID fID;
+ SkRect fBounds;
+ SkIPoint16 fAtlasLocation;
SK_DECLARE_INTERNAL_LLIST_INTERFACE(PathData);
static inline const Key& GetKey(const PathData& data) {
@@ -70,26 +69,19 @@ private:
return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(&key), sizeof(key));
}
};
+
+ static void HandleEviction(GrBatchAtlas::AtlasID, void*);
+
typedef SkTInternalLList<PathData> PathDataList;
GrContext* fContext;
- GrAtlas* fAtlas;
- SkAutoTUnref<GrGeometryProcessor> fCachedGeometryProcessor;
- // current set of flags used to create the cached geometry processor
- uint32_t fEffectFlags;
- GrAtlas::ClientPlotUsage fPlotUsage;
+ GrBatchAtlas* fAtlas;
SkTDynamicHash<PathData, PathData::Key> fPathCache;
PathDataList fPathList;
- bool internalDrawPath(GrDrawTarget*, GrPipelineBuilder*, GrColor, const SkMatrix& viewMatrix,
- const SkPath& path, const PathData* pathData);
- inline bool uploadPath(GrPlot** plot, SkIPoint16* atlasLocation, int width, int height,
- void* dfStorage);
- PathData* addPathToAtlas(const SkPath& path, const SkStrokeRec& stroke, bool antiAlias,
- uint32_t dimension, SkScalar scale);
- bool freeUnusedPlot();
-
typedef GrPathRenderer INHERITED;
+
+ friend class AADistanceFieldPathBatch;
};
#endif
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698