aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-12-16 18:59:19 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-17 00:35:39 +0000
commit2ee084e73056b0ad76b721017f576168b7306da3 (patch)
treea07e78e5b454be986463704ab480dfa97750671b /src/gpu/ops
parent903da79a19c35723ff198d56923250d5f3fe0f15 (diff)
Rename GrBatchAtlas -> GrDrawOpAtlas.
Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9 Reviewed-on: https://skia-review.googlesource.com/6165 Commit-Queue: Brian Salomon <brian@thesalomons.net> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/ops')
-rw-r--r--src/gpu/ops/GrAADistanceFieldPathRenderer.cpp21
-rw-r--r--src/gpu/ops/GrAADistanceFieldPathRenderer.h12
2 files changed, 16 insertions, 17 deletions
diff --git a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp
index 4daa48f039..d72a239cc2 100644
--- a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp
@@ -40,7 +40,7 @@ static const int kMediumMIP = 73;
static const int kLargeMIP = 162;
// Callback to clear out internal path cache when eviction occurs
-void GrAADistanceFieldPathRenderer::HandleEviction(GrBatchAtlas::AtlasID id, void* pr) {
+void GrAADistanceFieldPathRenderer::HandleEviction(GrDrawOpAtlas::AtlasID id, void* pr) {
GrAADistanceFieldPathRenderer* dfpr = (GrAADistanceFieldPathRenderer*)pr;
// remove any paths that use this plot
ShapeDataList::Iter iter;
@@ -127,7 +127,7 @@ public:
using ShapeDataList = GrAADistanceFieldPathRenderer::ShapeDataList;
static sk_sp<GrDrawOp> Make(GrColor color, const GrShape& shape, const SkMatrix& viewMatrix,
- GrBatchAtlas* atlas, ShapeCache* shapeCache,
+ GrDrawOpAtlas* atlas, ShapeCache* shapeCache,
ShapeDataList* shapeList, bool gammaCorrect) {
return sk_sp<GrDrawOp>(new AADistanceFieldPathOp(color, shape, viewMatrix, atlas,
shapeCache, shapeList, gammaCorrect));
@@ -154,7 +154,7 @@ public:
private:
AADistanceFieldPathOp(GrColor color, const GrShape& shape, const SkMatrix& viewMatrix,
- GrBatchAtlas* atlas, ShapeCache* shapeCache, ShapeDataList* shapeList,
+ GrDrawOpAtlas* atlas, ShapeCache* shapeCache, ShapeDataList* shapeList,
bool gammaCorrect)
: INHERITED(ClassID()) {
SkASSERT(shape.hasUnstyledKey());
@@ -210,7 +210,7 @@ private:
FlushInfo flushInfo;
// Setup GrGeometryProcessor
- GrBatchAtlas* atlas = fAtlas;
+ GrDrawOpAtlas* atlas = fAtlas;
flushInfo.fGeometryProcessor = GrDistanceFieldPathGeoProc::Make(this->color(),
this->viewMatrix(),
atlas->getTexture(),
@@ -303,7 +303,7 @@ private:
this->flush(target, &flushInfo);
}
- bool addPathToAtlas(GrMeshDrawOp::Target* target, FlushInfo* flushInfo, GrBatchAtlas* atlas,
+ bool addPathToAtlas(GrMeshDrawOp::Target* target, FlushInfo* flushInfo, GrDrawOpAtlas* atlas,
ShapeData* shapeData, const GrShape& shape, uint32_t dimension,
SkScalar scale) const {
const SkRect& bounds = shape.bounds();
@@ -377,7 +377,7 @@ private:
// add to atlas
SkIPoint16 atlasLocation;
- GrBatchAtlas::AtlasID id;
+ GrDrawOpAtlas::AtlasID id;
if (!atlas->addToAtlas(&id, target, width, height, dfStorage.get(), &atlasLocation)) {
this->flush(target, flushInfo);
if (!atlas->addToAtlas(&id, target, width, height, dfStorage.get(), &atlasLocation)) {
@@ -425,13 +425,12 @@ private:
}
void writePathVertices(GrDrawOp::Target* target,
- GrBatchAtlas* atlas,
+ GrDrawOpAtlas* atlas,
intptr_t offset,
GrColor color,
size_t vertexStride,
SkScalar maxScale,
const ShapeData* shapeData) const {
-
SkPoint* positions = reinterpret_cast<SkPoint*>(offset);
// vertex positions
@@ -499,7 +498,7 @@ private:
};
SkSTArray<1, Entry> fShapes;
- GrBatchAtlas* fAtlas;
+ GrDrawOpAtlas* fAtlas;
ShapeCache* fShapeCache;
ShapeDataList* fShapeList;
bool fGammaCorrect;
@@ -560,7 +559,7 @@ struct PathTestStruct {
fShapeCache.reset();
}
- static void HandleEviction(GrBatchAtlas::AtlasID id, void* pr) {
+ static void HandleEviction(GrDrawOpAtlas::AtlasID id, void* pr) {
PathTestStruct* dfpr = (PathTestStruct*)pr;
// remove any paths that use this plot
ShapeDataList::Iter iter;
@@ -577,7 +576,7 @@ struct PathTestStruct {
}
uint32_t fContextID;
- std::unique_ptr<GrBatchAtlas> fAtlas;
+ std::unique_ptr<GrDrawOpAtlas> fAtlas;
ShapeCache fShapeCache;
ShapeDataList fShapeList;
};
diff --git a/src/gpu/ops/GrAADistanceFieldPathRenderer.h b/src/gpu/ops/GrAADistanceFieldPathRenderer.h
index 29db2e0927..5d3480743d 100644
--- a/src/gpu/ops/GrAADistanceFieldPathRenderer.h
+++ b/src/gpu/ops/GrAADistanceFieldPathRenderer.h
@@ -69,10 +69,10 @@ private:
// 64x64 max, 128x128 max) and the GrShape's key.
SkAutoSTArray<24, uint32_t> fKey;
};
- Key fKey;
- GrBatchAtlas::AtlasID fID;
- SkRect fBounds;
- SkRect fTexCoords;
+ Key fKey;
+ GrDrawOpAtlas::AtlasID fID;
+ SkRect fBounds;
+ SkRect fTexCoords;
SK_DECLARE_INTERNAL_LLIST_INTERFACE(ShapeData);
static inline const Key& GetKey(const ShapeData& data) {
@@ -84,12 +84,12 @@ private:
}
};
- static void HandleEviction(GrBatchAtlas::AtlasID, void*);
+ static void HandleEviction(GrDrawOpAtlas::AtlasID, void*);
typedef SkTDynamicHash<ShapeData, ShapeData::Key> ShapeCache;
typedef SkTInternalLList<ShapeData> ShapeDataList;
- std::unique_ptr<GrBatchAtlas> fAtlas;
+ std::unique_ptr<GrDrawOpAtlas> fAtlas;
ShapeCache fShapeCache;
ShapeDataList fShapeList;