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

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: more tidying Created 5 years, 10 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/GrAADistanceFieldPathRenderer.h
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.h b/src/gpu/GrAADistanceFieldPathRenderer.h
index c145e2fe3f201b6ced83ed3cbc388c37db063dd6..6c082c9ba559766419d36290bd05e92f3ed4039b 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) {
@@ -73,23 +72,14 @@ private:
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;
+
+ // TODO Hack hack hack
+ friend class AADistanceFieldPathBatch;
};
#endif

Powered by Google App Engine
This is Rietveld 408576698