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

Unified Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 1286043004: Make GrVertexBatch objects hold their own draws during GrDrawTarget flush (Closed) Base URL: https://skia.googlesource.com/skia.git@m
Patch Set: forward decl 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
« no previous file with comments | « src/gpu/batches/GrVertexBatch.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDashingEffect.cpp
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index 9da8c69f24dc6f21e591a346b8a944365dd08fdc..e888f6d88c4f96f0e6405e0bdab5033c3224af6a 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -7,7 +7,7 @@
#include "GrDashingEffect.h"
-#include "GrBatchTarget.h"
+#include "GrBatchFlushState.h"
#include "GrBatchTest.h"
#include "GrCaps.h"
#include "GrGeometryProcessor.h"
@@ -298,7 +298,7 @@ public:
bool fHasEndRect;
};
- void generateGeometry(GrBatchTarget* batchTarget) override {
+ void onPrepareDraws(Target* target) override {
int instanceCount = fGeoData.count();
SkPaint::Cap cap = this->cap();
bool isRoundCap = SkPaint::kRound_Cap == cap;
@@ -324,7 +324,7 @@ public:
return;
}
- batchTarget->initDraw(gp, this->pipeline());
+ target->initDraw(gp, this->pipeline());
// useAA here means Edge AA or MSAA
bool useAA = this->aaMode() != kBW_DashAAMode;
@@ -529,7 +529,7 @@ public:
}
QuadHelper helper;
- void* vertices = helper.init(batchTarget, gp->getVertexStride(), totalRectCount);
+ void* vertices = helper.init(target, gp->getVertexStride(), totalRectCount);
if (!vertices) {
return;
}
@@ -591,7 +591,7 @@ public:
rectIndex++;
}
SkASSERT(0 == (curVIdx % 4) && (curVIdx / 4) == totalRectCount);
- helper.issueDraw(batchTarget);
+ helper.recordDraw(target);
}
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
« no previous file with comments | « src/gpu/batches/GrVertexBatch.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698