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

Side by Side Diff: src/gpu/GrInOrderCommandBuilder.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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrInOrderCommandBuilder.h ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "GrInOrderCommandBuilder.h"
9
10 #include "GrBufferedDrawTarget.h"
11
12 #include "GrColor.h"
13 #include "SkPoint.h"
14
15 GrTargetCommands::Cmd* GrInOrderCommandBuilder::recordDrawBatch(GrBatch* batch,
16 const GrCaps& ca ps) {
17 GrBATCH_INFO("In-Recording (%s, %u)\n", batch->name(), batch->uniqueID());
18 if (!this->cmdBuffer()->empty() &&
19 Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) {
20 DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back() );
21 if (previous->batch()->combineIfPossible(batch, caps)) {
22 GrBATCH_INFO("\tBatching with (%s, %u)\n",
23 previous->batch()->name(), previous->batch()->uniqueID( ));
24 return nullptr;
25 }
26 }
27
28 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch));
29 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderCommandBuilder.h ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698