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

Side by Side Diff: src/gpu/batches/GrDrawBatch.cpp

Issue 1345393003: Revert of add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/batches/GrDrawBatch.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrDrawBatch.h" 8 #include "GrDrawBatch.h"
9 9
10 GrDrawBatch::GrDrawBatch(uint32_t classID) : INHERITED(classID), fPipelineInstal led(false) { } 10 GrDrawBatch::GrDrawBatch() : fPipelineInstalled(false) { }
11 11
12 GrDrawBatch::~GrDrawBatch() { 12 GrDrawBatch::~GrDrawBatch() {
13 if (fPipelineInstalled) { 13 if (fPipelineInstalled) {
14 this->pipeline()->~GrPipeline(); 14 this->pipeline()->~GrPipeline();
15 } 15 }
16 } 16 }
17 17
18 bool GrDrawBatch::installPipeline(const GrPipeline::CreateArgs& args) { 18 bool GrDrawBatch::installPipeline(const GrPipeline::CreateArgs& args) {
19 GrPipelineOptimizations opts; 19 GrPipelineOptimizations opts;
20 void* location = fPipelineStorage.get(); 20 void* location = fPipelineStorage.get();
21 if (!GrPipeline::CreateAt(location, args, &opts)) { 21 if (!GrPipeline::CreateAt(location, args, &opts)) {
22 return false; 22 return false;
23 } 23 }
24 this->initBatchTracker(opts); 24 this->initBatchTracker(opts);
25 fPipelineInstalled = true; 25 fPipelineInstalled = true;
26 return true; 26 return true;
27 } 27 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawBatch.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698