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

Side by Side Diff: src/gpu/GrDrawContext.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/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('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 2015 Google Inc. 3 * Copyright 2015 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 "GrAtlasTextContext.h" 9 #include "GrAtlasTextContext.h"
10 #include "GrBatchTest.h" 10 #include "GrBatchTest.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 GrDrawContext::~GrDrawContext() { 69 GrDrawContext::~GrDrawContext() {
70 SkSafeUnref(fDrawTarget); 70 SkSafeUnref(fDrawTarget);
71 } 71 }
72 72
73 GrDrawTarget* GrDrawContext::getDrawTarget() { 73 GrDrawTarget* GrDrawContext::getDrawTarget() {
74 SkDEBUGCODE(this->validate();) 74 SkDEBUGCODE(this->validate();)
75 75
76 if (!fDrawTarget || fDrawTarget->isClosed()) { 76 if (!fDrawTarget || fDrawTarget->isClosed()) {
77 fDrawTarget = fDrawingManager->newDrawTarget(fRenderTarget); 77 fDrawTarget = fDrawingManager->newDrawTarget(fRenderTarget);
78 fRenderTarget->setLastDrawTarget(fDrawTarget);
79 } 78 }
80 79
81 return fDrawTarget; 80 return fDrawTarget;
82 } 81 }
83 82
84 void GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk IPoint& dstPoint) { 83 void GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk IPoint& dstPoint) {
85 RETURN_IF_ABANDONED 84 RETURN_IF_ABANDONED
86 SkDEBUGCODE(this->validate();) 85 SkDEBUGCODE(this->validate();)
87 86
88 this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPoint); 87 this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPoint);
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 args.fAntiAlias = useCoverageAA; 787 args.fAntiAlias = useCoverageAA;
789 pr->drawPath(args); 788 pr->drawPath(args);
790 } 789 }
791 790
792 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { 791 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) {
793 RETURN_IF_ABANDONED 792 RETURN_IF_ABANDONED
794 SkDEBUGCODE(this->validate();) 793 SkDEBUGCODE(this->validate();)
795 794
796 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); 795 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch);
797 } 796 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698