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

Side by Side Diff: src/gpu/GrRenderTargetOpList.cpp

Issue 2468743002: TEMPORARY: track stencil clip state in GrRenderTargetOpList (Closed)
Patch Set: Created 4 years, 1 month 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/GrRenderTargetOpList.h ('k') | src/gpu/GrStencilAttachment.h » ('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 2010 Google Inc. 2 * Copyright 2010 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 #include "GrRenderTargetOpList.h" 8 #include "GrRenderTargetOpList.h"
9 9
10 #include "GrAppliedClip.h" 10 #include "GrAppliedClip.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Experimentally we have found that most batching occurs within the first 10 co mparisons. 45 // Experimentally we have found that most batching occurs within the first 10 co mparisons.
46 static const int kDefaultMaxBatchLookback = 10; 46 static const int kDefaultMaxBatchLookback = 10;
47 static const int kDefaultMaxBatchLookahead = 10; 47 static const int kDefaultMaxBatchLookahead = 10;
48 48
49 GrRenderTargetOpList::GrRenderTargetOpList(GrRenderTargetProxy* rtp, GrGpu* gpu, 49 GrRenderTargetOpList::GrRenderTargetOpList(GrRenderTargetProxy* rtp, GrGpu* gpu,
50 GrResourceProvider* resourceProvider, 50 GrResourceProvider* resourceProvider,
51 GrAuditTrail* auditTrail, const Optio ns& options) 51 GrAuditTrail* auditTrail, const Optio ns& options)
52 : INHERITED(rtp, auditTrail) 52 : INHERITED(rtp, auditTrail)
53 , fLastFullClearBatch(nullptr) 53 , fLastFullClearBatch(nullptr)
54 , fGpu(SkRef(gpu)) 54 , fGpu(SkRef(gpu))
55 , fResourceProvider(resourceProvider) { 55 , fResourceProvider(resourceProvider)
56 , fLastClipStackGenID(SK_InvalidUniqueID) {
56 // TODO: Stop extracting the context (currently needed by GrClip) 57 // TODO: Stop extracting the context (currently needed by GrClip)
57 fContext = fGpu->getContext(); 58 fContext = fGpu->getContext();
58 59
59 fClipBatchToBounds = options.fClipBatchToBounds; 60 fClipBatchToBounds = options.fClipBatchToBounds;
60 fDrawBatchBounds = options.fDrawBatchBounds; 61 fDrawBatchBounds = options.fDrawBatchBounds;
61 fMaxBatchLookback = (options.fMaxBatchLookback < 0) ? kDefaultMaxBatchLookba ck : 62 fMaxBatchLookback = (options.fMaxBatchLookback < 0) ? kDefaultMaxBatchLookba ck :
62 options.fMaxBatchLookb ack; 63 options.fMaxBatchLookb ack;
63 fMaxBatchLookahead = (options.fMaxBatchLookahead < 0) ? kDefaultMaxBatchLook ahead : 64 fMaxBatchLookahead = (options.fMaxBatchLookahead < 0) ? kDefaultMaxBatchLook ahead :
64 options.fMaxBatchLook ahead; 65 options.fMaxBatchLook ahead;
65 66
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 572
572 /////////////////////////////////////////////////////////////////////////////// 573 ///////////////////////////////////////////////////////////////////////////////
573 574
574 void GrRenderTargetOpList::clearStencilClip(const GrFixedClip& clip, 575 void GrRenderTargetOpList::clearStencilClip(const GrFixedClip& clip,
575 bool insideStencilMask, 576 bool insideStencilMask,
576 GrRenderTarget* rt) { 577 GrRenderTarget* rt) {
577 GrBatch* batch = new GrClearStencilClipBatch(clip, insideStencilMask, rt); 578 GrBatch* batch = new GrClearStencilClipBatch(clip, insideStencilMask, rt);
578 this->recordBatch(batch, batch->bounds()); 579 this->recordBatch(batch, batch->bounds());
579 batch->unref(); 580 batch->unref();
580 } 581 }
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTargetOpList.h ('k') | src/gpu/GrStencilAttachment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698