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

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

Issue 1315513008: Cleanup GrDrawTarget now that all paths lead to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@patharray
Patch Set: remove change to SampleApp.cpp 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
« no previous file with comments | « src/gpu/GrTracing.h ('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 GrStencilPathBatch_DEFINED 8 #ifndef GrStencilPathBatch_DEFINED
9 #define GrStencilPathBatch_DEFINED 9 #define GrStencilPathBatch_DEFINED
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const GrScissorState& scissor, 43 const GrScissorState& scissor,
44 GrRenderTarget* renderTarget, 44 GrRenderTarget* renderTarget,
45 const GrPath* path) 45 const GrPath* path)
46 : fViewMatrix(viewMatrix) 46 : fViewMatrix(viewMatrix)
47 , fUseHWAA(useHWAA) 47 , fUseHWAA(useHWAA)
48 , fStencil(stencil) 48 , fStencil(stencil)
49 , fScissor(scissor) 49 , fScissor(scissor)
50 , fRenderTarget(renderTarget) 50 , fRenderTarget(renderTarget)
51 , fPath(path) { 51 , fPath(path) {
52 this->initClassID<GrStencilPathBatch>(); 52 this->initClassID<GrStencilPathBatch>();
53 fBounds = path->getBounds();
53 } 54 }
54 55
55 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; } 56 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; }
56 57
57 void onPrepare(GrBatchFlushState*) override {} 58 void onPrepare(GrBatchFlushState*) override {}
58 59
59 void onDraw(GrBatchFlushState* state) override { 60 void onDraw(GrBatchFlushState* state) override {
60 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix, 61 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix,
61 &fScissor, &fStencil); 62 &fScissor, &fStencil);
62 state->gpu()->pathRendering()->stencilPath(args, fPath.get()); 63 state->gpu()->pathRendering()->stencilPath(args, fPath.get());
63 } 64 }
64 65
65 SkMatrix fViewMatrix; 66 SkMatrix fViewMatrix;
66 bool fUseHWAA; 67 bool fUseHWAA;
67 GrStencilSettings fStencil; 68 GrStencilSettings fStencil;
68 GrScissorState fScissor; 69 GrScissorState fScissor;
69 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 70 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
70 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; 71 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
71 }; 72 };
72 73
73 #endif 74 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTracing.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698