aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTargetCommands.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-09-10 10:42:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-10 10:42:55 -0700
commit512be5340c2a29550053d35bc058d3aecd5c1fc7 (patch)
tree05969b66ede9cca1e593579369938f01785cbeb4 /src/gpu/GrTargetCommands.cpp
parent4a37d08382a16717cde52c3d2687b021c5413464 (diff)
Cleanup GrDrawTarget now that all paths lead to GrBatch
Diffstat (limited to 'src/gpu/GrTargetCommands.cpp')
-rw-r--r--src/gpu/GrTargetCommands.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/gpu/GrTargetCommands.cpp b/src/gpu/GrTargetCommands.cpp
deleted file mode 100644
index 2194e08f0a..0000000000
--- a/src/gpu/GrTargetCommands.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrTargetCommands.h"
-
-#include "GrBatchFlushState.h"
-#include "GrGpu.h"
-#include "GrPathRendering.h"
-#include "batches/GrDrawBatch.h"
-#include "batches/GrVertexBatch.h"
-
-GrBATCH_SPEW(int32_t GrTargetCommands::Cmd::gUniqueID = 0;)
-
-void GrTargetCommands::reset() {
- fCmdBuffer.reset();
-}
-
-void GrTargetCommands::flush(GrGpu* gpu, GrResourceProvider* resourceProvider) {
- GrBATCH_INFO("Flushing\n");
- if (fCmdBuffer.empty()) {
- return;
- }
- GrBatchFlushState flushState(gpu, resourceProvider, fLastFlushToken);
- // Loop over all batches and generate geometry
- CmdBuffer::Iter genIter(fCmdBuffer);
- while (genIter.next()) {
- if (Cmd::kDrawBatch_CmdType == genIter->type()) {
- DrawBatch* db = reinterpret_cast<DrawBatch*>(genIter.get());
- db->batch()->prepare(&flushState);
- }
- }
-
- flushState.preIssueDraws();
-
- CmdBuffer::Iter iter(fCmdBuffer);
- while (iter.next()) {
- iter->execute(&flushState);
- }
- fLastFlushToken = flushState.lastFlushedToken();
-}
-
-void GrTargetCommands::DrawBatch::execute(GrBatchFlushState* state) {
- fBatch->draw(state);
-}