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

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

Issue 1292113002: fix up batch_spew (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrReorderCommandBuilder.cpp ('k') | no next file » | 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 #ifndef GrTargetCommands_DEFINED 8 #ifndef GrTargetCommands_DEFINED
9 #define GrTargetCommands_DEFINED 9 #define GrTargetCommands_DEFINED
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 struct DrawBatch : public Cmd { 234 struct DrawBatch : public Cmd {
235 DrawBatch(GrBatch* batch, GrBatchTarget* batchTarget) 235 DrawBatch(GrBatch* batch, GrBatchTarget* batchTarget)
236 : Cmd(kDrawBatch_CmdType) 236 : Cmd(kDrawBatch_CmdType)
237 , fBatch(SkRef(batch)) 237 , fBatch(SkRef(batch))
238 , fBatchTarget(batchTarget) { 238 , fBatchTarget(batchTarget) {
239 SkASSERT(!batch->isUsed()); 239 SkASSERT(!batch->isUsed());
240 } 240 }
241 241
242 GrBatch* batch() { return fBatch; } 242 GrBatch* batch() { return fBatch; }
243 void execute(GrGpu*) override; 243 void execute(GrGpu*) override;
244
244 private: 245 private:
245 SkAutoTUnref<GrBatch> fBatch; 246 SkAutoTUnref<GrBatch> fBatch;
246 GrBatchTarget* fBatchTarget; 247 GrBatchTarget* fBatchTarget;
247 }; 248 };
248 249
249 static const int kCmdBufferInitialSizeInBytes = 8 * 1024; 250 static const int kCmdBufferInitialSizeInBytes = 8 * 1024;
250 251
251 typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double. 252 typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
252 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; 253 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer;
253 254
254 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } 255 CmdBuffer* cmdBuffer() { return &fCmdBuffer; }
255 GrBatchTarget* batchTarget() { return &fBatchTarget; } 256 GrBatchTarget* batchTarget() { return &fBatchTarget; }
256 257
257 CmdBuffer fCmdBuffer; 258 CmdBuffer fCmdBuffer;
258 GrBatchTarget fBatchTarget; 259 GrBatchTarget fBatchTarget;
259 }; 260 };
260 261
261 #endif 262 #endif
262 263
OLDNEW
« no previous file with comments | « src/gpu/GrReorderCommandBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698