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

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

Issue 1471083002: Add debug option to clip each GrBatch to its device bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@clipbounds
Patch Set: update Created 5 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/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
(...skipping 14 matching lines...) Expand all
25 #include "batches/GrDiscardBatch.h" 25 #include "batches/GrDiscardBatch.h"
26 #include "batches/GrDrawBatch.h" 26 #include "batches/GrDrawBatch.h"
27 #include "batches/GrDrawPathBatch.h" 27 #include "batches/GrDrawPathBatch.h"
28 #include "batches/GrRectBatchFactory.h" 28 #include "batches/GrRectBatchFactory.h"
29 #include "batches/GrStencilPathBatch.h" 29 #include "batches/GrStencilPathBatch.h"
30 30
31 #include "SkStrokeRec.h" 31 #include "SkStrokeRec.h"
32 32
33 //////////////////////////////////////////////////////////////////////////////// 33 ////////////////////////////////////////////////////////////////////////////////
34 34
35 GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* r esourceProvider) 35 GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* r esourceProvider,
36 const Options& options)
36 : fGpu(SkRef(gpu)) 37 : fGpu(SkRef(gpu))
37 , fResourceProvider(resourceProvider) 38 , fResourceProvider(resourceProvider)
38 , fFlushing(false) 39 , fFlushing(false)
39 , fFlags(0) 40 , fFlags(0)
40 , fRenderTarget(rt) { 41 , fRenderTarget(rt) {
41 // TODO: Stop extracting the context (currently needed by GrClipMaskManager) 42 // TODO: Stop extracting the context (currently needed by GrClipMaskManager)
42 fContext = fGpu->getContext(); 43 fContext = fGpu->getContext();
43 fClipMaskManager.reset(new GrClipMaskManager(this)); 44 fClipMaskManager.reset(new GrClipMaskManager(this, options.fClipBatchToBound s));
44 45
45 rt->setLastDrawTarget(this); 46 rt->setLastDrawTarget(this);
46 47
47 #ifdef SK_DEBUG 48 #ifdef SK_DEBUG
48 static int debugID = 0; 49 static int debugID = 0;
49 fDebugID = debugID++; 50 fDebugID = debugID++;
50 #endif 51 #endif
51 } 52 }
52 53
53 GrDrawTarget::~GrDrawTarget() { 54 GrDrawTarget::~GrDrawTarget() {
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 } 550 }
550 551
551 return true; 552 return true;
552 } 553 }
553 554
554 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 555 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
555 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 556 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
556 this->recordBatch(batch); 557 this->recordBatch(batch);
557 batch->unref(); 558 batch->unref();
558 } 559 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698