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

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

Issue 1352813003: add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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
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 GrStencilPathBatch_DEFINED 8 #ifndef GrStencilPathBatch_DEFINED
9 #define GrStencilPathBatch_DEFINED 9 #define GrStencilPathBatch_DEFINED
10 10
11 #include "GrBatch.h" 11 #include "GrBatch.h"
12 #include "GrBatchFlushState.h" 12 #include "GrBatchFlushState.h"
13 #include "GrGpu.h" 13 #include "GrGpu.h"
14 #include "GrPath.h" 14 #include "GrPath.h"
15 #include "GrPathRendering.h" 15 #include "GrPathRendering.h"
16 #include "GrRenderTarget.h" 16 #include "GrRenderTarget.h"
17 17
18 class GrStencilPathBatch final : public GrBatch { 18 class GrStencilPathBatch final : public GrBatch {
19 public: 19 public:
20 static GrBatch* Create(const SkMatrix& viewMatrix, 20 static GrBatch* Create(const SkMatrix& viewMatrix,
21 bool useHWAA, 21 bool useHWAA,
22 const GrStencilSettings& stencil, 22 const GrStencilSettings& stencil,
23 const GrScissorState& scissor, 23 const GrScissorState& scissor,
24 GrRenderTarget* renderTarget, 24 GrRenderTarget* renderTarget,
25 const GrPath* path) { 25 const GrPath* path) {
26 return new GrStencilPathBatch(viewMatrix, useHWAA, stencil, scissor, ren derTarget, path); 26 return new GrStencilPathBatch(viewMatrix, useHWAA, stencil, scissor, ren derTarget, path);
27 } 27 }
28 28
29 BATCH_CLASS_ID
30
29 const char* name() const override { return "StencilPath"; } 31 const char* name() const override { return "StencilPath"; }
30 32
31 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()- >getUniqueID(); } 33 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()- >getUniqueID(); }
32 34
33 SkString dumpInfo() const override { 35 SkString dumpInfo() const override {
34 SkString string; 36 SkString string;
35 string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA); 37 string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA);
36 return string; 38 return string;
37 } 39 }
38 40
(...skipping 26 matching lines...) Expand all
65 67
66 SkMatrix fViewMatrix; 68 SkMatrix fViewMatrix;
67 bool fUseHWAA; 69 bool fUseHWAA;
68 GrStencilSettings fStencil; 70 GrStencilSettings fStencil;
69 GrScissorState fScissor; 71 GrScissorState fScissor;
70 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 72 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
71 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; 73 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
72 }; 74 };
73 75
74 #endif 76 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698