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); |
78 } | 79 } |
79 | 80 |
80 return fDrawTarget; | 81 return fDrawTarget; |
81 } | 82 } |
82 | 83 |
83 void GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk
IPoint& dstPoint) { | 84 void GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk
IPoint& dstPoint) { |
84 RETURN_IF_ABANDONED | 85 RETURN_IF_ABANDONED |
85 SkDEBUGCODE(this->validate();) | 86 SkDEBUGCODE(this->validate();) |
86 | 87 |
87 this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPoint); | 88 this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPoint); |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 args.fAntiAlias = useCoverageAA; | 788 args.fAntiAlias = useCoverageAA; |
788 pr->drawPath(args); | 789 pr->drawPath(args); |
789 } | 790 } |
790 | 791 |
791 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { | 792 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { |
792 RETURN_IF_ABANDONED | 793 RETURN_IF_ABANDONED |
793 SkDEBUGCODE(this->validate();) | 794 SkDEBUGCODE(this->validate();) |
794 | 795 |
795 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); | 796 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); |
796 } | 797 } |
OLD | NEW |