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

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

Issue 1296483002: Split GrDrawBatch and GrVertexBatch into their own files (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add new files to git Created 5 years, 4 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/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrDrawBatch.cpp » ('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 #ifndef GrDrawBatch_DEFINED
9 #define GrDrawBatch_DEFINED
10
11 #include "GrBatch.h"
12 #include "GrPipeline.h"
13
14 struct GrInitInvariantOutput;
15
16 /**
17 * Base class for GrBatches that draw. These batches have a GrPipeline installed by GrDrawTarget.
18 */
19 class GrDrawBatch : public GrBatch {
20 public:
21 GrDrawBatch();
22 ~GrDrawBatch() override;
23
24 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0;
25 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const = 0;
26
27 const GrPipeline* pipeline() const {
28 SkASSERT(fPipelineInstalled);
29 return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get());
30 }
31
32 bool installPipeline(const GrPipeline::CreateArgs&);
33
34 // TODO no GrPrimitiveProcessors yet read fragment position
35 bool willReadFragmentPosition() const { return false; }
36
37 private:
38 /**
39 * initBatchTracker is a hook for the some additional overrides / optimizati on possibilities
40 * from the GrXferProcessor.
41 */
42 virtual void initBatchTracker(const GrPipelineOptimizations&) = 0;
43
44 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage;
45 bool fPipelineInstalled;
46 typedef GrBatch INHERITED;
47 };
48
49 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrDrawBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698