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

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

Issue 1441533003: Update testing frameworks/tests for MDB (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix ref counting bug 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/GrDrawContext.cpp ('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 24 matching lines...) Expand all
35 GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* r esourceProvider) 35 GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* r esourceProvider)
36 : fGpu(SkRef(gpu)) 36 : fGpu(SkRef(gpu))
37 , fResourceProvider(resourceProvider) 37 , fResourceProvider(resourceProvider)
38 , fFlushing(false) 38 , fFlushing(false)
39 , fFlags(0) 39 , fFlags(0)
40 , fRenderTarget(rt) { 40 , fRenderTarget(rt) {
41 // TODO: Stop extracting the context (currently needed by GrClipMaskManager) 41 // TODO: Stop extracting the context (currently needed by GrClipMaskManager)
42 fContext = fGpu->getContext(); 42 fContext = fGpu->getContext();
43 fClipMaskManager.reset(new GrClipMaskManager(this)); 43 fClipMaskManager.reset(new GrClipMaskManager(this));
44 44
45 rt->setLastDrawTarget(this);
46
45 #ifdef SK_DEBUG 47 #ifdef SK_DEBUG
46 static int debugID = 0; 48 static int debugID = 0;
47 fDebugID = debugID++; 49 fDebugID = debugID++;
48 #endif 50 #endif
49 } 51 }
50 52
51 GrDrawTarget::~GrDrawTarget() { 53 GrDrawTarget::~GrDrawTarget() {
52 if (fRenderTarget && this == fRenderTarget->getLastDrawTarget()) { 54 if (fRenderTarget && this == fRenderTarget->getLastDrawTarget()) {
53 fRenderTarget->setLastDrawTarget(nullptr); 55 fRenderTarget->setLastDrawTarget(nullptr);
54 } 56 }
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 } 547 }
546 548
547 return true; 549 return true;
548 } 550 }
549 551
550 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 552 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
551 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 553 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
552 this->recordBatch(batch); 554 this->recordBatch(batch);
553 batch->unref(); 555 batch->unref();
554 } 556 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawingManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698