summaryrefslogtreecommitdiff
path: root/chromium/third_party/skia/tools/DDLTileHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/tools/DDLTileHelper.cpp')
-rw-r--r--chromium/third_party/skia/tools/DDLTileHelper.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/chromium/third_party/skia/tools/DDLTileHelper.cpp b/chromium/third_party/skia/tools/DDLTileHelper.cpp
index 7771a6ec961..6333ded6219 100644
--- a/chromium/third_party/skia/tools/DDLTileHelper.cpp
+++ b/chromium/third_party/skia/tools/DDLTileHelper.cpp
@@ -109,6 +109,7 @@ void DDLTileHelper::createComposeDDL() {
}
fComposeDDL = recorder.detach();
+ SkASSERT(fComposeDDL);
}
void DDLTileHelper::TileData::precompile(GrContext* context) {
@@ -287,6 +288,11 @@ static void do_gpu_stuff(GrContext* context, DDLTileHelper::TileData* tile) {
tile->precompile(context);
tile->draw(context);
+
+ // TODO: remove this flush once DDLs are reffed by the drawing manager
+ context->flushAndSubmit();
+
+ tile->dropDDL();
}
// We expect to have more than one recording thread but just one gpu thread
@@ -315,6 +321,7 @@ void DDLTileHelper::kickOffThreadedWork(SkTaskGroup* recordingTaskGroup,
recordingTaskGroup->add([this] { this->createComposeDDL(); });
}
+// Only called from ViaDDL
void DDLTileHelper::precompileAndDrawAllTiles(GrContext* context) {
for (int i = 0; i < this->numTiles(); ++i) {
fTiles[i].precompile(context);
@@ -322,6 +329,7 @@ void DDLTileHelper::precompileAndDrawAllTiles(GrContext* context) {
}
}
+// Only called from skpbench
void DDLTileHelper::interleaveDDLCreationAndDraw(GrContext* context) {
for (int i = 0; i < this->numTiles(); ++i) {
fTiles[i].createDDL();
@@ -329,6 +337,7 @@ void DDLTileHelper::interleaveDDLCreationAndDraw(GrContext* context) {
}
}
+// Only called from skpbench
void DDLTileHelper::drawAllTilesDirectly(GrContext* context) {
for (int i = 0; i < this->numTiles(); ++i) {
fTiles[i].drawSKPDirectly(context);