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

Side by Side Diff: src/gpu/GrBufferedDrawTarget.h

Issue 1275003004: Remove GrPipelineOptimizations member from GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@opt
Patch Set: rebase 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 | « no previous file | src/gpu/GrBufferedDrawTarget.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef GrBufferedDrawTarget_DEFINED 8 #ifndef GrBufferedDrawTarget_DEFINED
9 #define GrBufferedDrawTarget_DEFINED 9 #define GrBufferedDrawTarget_DEFINED
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // Records any trace markers for a command 107 // Records any trace markers for a command
108 void recordTraceMarkersIfNecessary(GrTargetCommands::Cmd*); 108 void recordTraceMarkersIfNecessary(GrTargetCommands::Cmd*);
109 SkString getCmdString(int index) const { 109 SkString getCmdString(int index) const {
110 SkASSERT(index < fGpuCmdMarkers.count()); 110 SkASSERT(index < fGpuCmdMarkers.count());
111 return fGpuCmdMarkers[index].toString(); 111 return fGpuCmdMarkers[index].toString();
112 } 112 }
113 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } 113 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; }
114 114
115 State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(const GrPrimitivePro cessor*, 115 State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(const GrPrimitivePro cessor*,
116 const GrDrawTarget:: PipelineInfo&); 116 const GrDrawTarget:: PipelineInfo&,
117 GrPipelineOptimizati ons* opts);
117 State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(GrBatch*, 118 State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(GrBatch*,
118 const GrDrawTarget:: PipelineInfo&); 119 const GrDrawTarget:: PipelineInfo&,
120 GrPipelineOptimizati ons* opts);
119 121
120 // TODO: Use a single allocator for commands and records 122 // TODO: Use a single allocator for commands and records
121 enum { 123 enum {
122 kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's 124 kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's
123 kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms 125 kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms
124 kPipelineBufferMinReserve = 32 * sizeof(State), 126 kPipelineBufferMinReserve = 32 * sizeof(State),
125 }; 127 };
126 128
127 // every 100 flushes we should reset our fPipelineBuffer to prevent us from holding at a 129 // every 100 flushes we should reset our fPipelineBuffer to prevent us from holding at a
128 // highwater mark 130 // highwater mark
129 static const int kPipelineBufferHighWaterMark = 100; 131 static const int kPipelineBufferHighWaterMark = 100;
130 132
131 SkAutoTDelete<GrCommandBuilder> fCommands; 133 SkAutoTDelete<GrCommandBuilder> fCommands;
132 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; 134 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
133 SkChunkAlloc fPathIndexBuffer; 135 SkChunkAlloc fPathIndexBuffer;
134 SkChunkAlloc fPathTransformBuffer; 136 SkChunkAlloc fPathTransformBuffer;
135 SkChunkAlloc fPipelineBuffer; 137 SkChunkAlloc fPipelineBuffer;
136 uint32_t fDrawID; 138 uint32_t fDrawID;
137 SkAutoTUnref<State> fPrevState; 139 SkAutoTUnref<State> fPrevState;
138 140
139 typedef GrClipTarget INHERITED; 141 typedef GrClipTarget INHERITED;
140 }; 142 };
141 143
142 #endif 144 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrBufferedDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698