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

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

Issue 1300093007: Init class ID in GrStencilPathBatch (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 | « no previous file | 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 GrStencilPathBatch_DEFINED 8 #ifndef GrStencilPathBatch_DEFINED
9 #define GrStencilPathBatch_DEFINED 9 #define GrStencilPathBatch_DEFINED
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool useHWAA, 42 bool useHWAA,
43 const GrStencilSettings& stencil, 43 const GrStencilSettings& stencil,
44 const GrScissorState& scissor, 44 const GrScissorState& scissor,
45 GrRenderTarget* renderTarget, 45 GrRenderTarget* renderTarget,
46 const GrPath* path) 46 const GrPath* path)
47 : fViewMatrix(viewMatrix) 47 : fViewMatrix(viewMatrix)
48 , fUseHWAA(useHWAA) 48 , fUseHWAA(useHWAA)
49 , fStencil(stencil) 49 , fStencil(stencil)
50 , fScissor(scissor) 50 , fScissor(scissor)
51 , fRenderTarget(renderTarget) 51 , fRenderTarget(renderTarget)
52 , fPath(path) {} 52 , fPath(path) {
53 this->initClassID<GrStencilPathBatch>();
54 }
53 55
54 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; } 56 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; }
55 57
56 void onPrepare(GrBatchFlushState*) override {} 58 void onPrepare(GrBatchFlushState*) override {}
57 59
58 void onDraw(GrBatchFlushState* state) override { 60 void onDraw(GrBatchFlushState* state) override {
59 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix, 61 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix,
60 &fScissor, &fStencil); 62 &fScissor, &fStencil);
61 state->gpu()->pathRendering()->stencilPath(args, fPath.get()); 63 state->gpu()->pathRendering()->stencilPath(args, fPath.get());
62 } 64 }
63 65
64 SkMatrix fViewMatrix; 66 SkMatrix fViewMatrix;
65 bool fUseHWAA; 67 bool fUseHWAA;
66 GrStencilSettings fStencil; 68 GrStencilSettings fStencil;
67 GrScissorState fScissor; 69 GrScissorState fScissor;
68 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 70 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
69 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; 71 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
70 }; 72 };
71 73
72 #endif 74 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698