OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |