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

Unified Diff: src/gpu/GrTargetCommands.cpp

Issue 1315513008: Cleanup GrDrawTarget now that all paths lead to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@patharray
Patch Set: remove change to SampleApp.cpp Created 5 years, 3 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/GrTargetCommands.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTargetCommands.cpp
diff --git a/src/gpu/GrTargetCommands.cpp b/src/gpu/GrTargetCommands.cpp
deleted file mode 100644
index 2194e08f0a44a37dd793a4338ea409bbb854fda6..0000000000000000000000000000000000000000
--- 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);
-}
« no previous file with comments | « src/gpu/GrTargetCommands.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698