| 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 "GrBatchTest.h" | 9 #include "GrBatchTest.h" |
| 10 #include "GrColor.h" | 10 #include "GrColor.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ASSERT_SINGLE_OWNER | 88 ASSERT_SINGLE_OWNER |
| 89 SkDEBUGCODE(this->validate();) | 89 SkDEBUGCODE(this->validate();) |
| 90 | 90 |
| 91 if (!fDrawTarget || fDrawTarget->isClosed()) { | 91 if (!fDrawTarget || fDrawTarget->isClosed()) { |
| 92 fDrawTarget = fDrawingManager->newDrawTarget(fRenderTarget); | 92 fDrawTarget = fDrawingManager->newDrawTarget(fRenderTarget); |
| 93 } | 93 } |
| 94 | 94 |
| 95 return fDrawTarget; | 95 return fDrawTarget; |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk
IPoint& dstPoint) { | 98 void GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk
IPoint& dstPoint) { |
| 99 ASSERT_SINGLE_OWNER | 99 ASSERT_SINGLE_OWNER |
| 100 RETURN_FALSE_IF_ABANDONED | 100 RETURN_IF_ABANDONED |
| 101 SkDEBUGCODE(this->validate();) | 101 SkDEBUGCODE(this->validate();) |
| 102 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::copySurface"); | 102 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::copySurface"); |
| 103 | 103 |
| 104 return this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPo
int); | 104 this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPoint); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void GrDrawContext::drawText(const GrClip& clip, const GrPaint& grPaint, | 107 void GrDrawContext::drawText(const GrClip& clip, const GrPaint& grPaint, |
| 108 const SkPaint& skPaint, | 108 const SkPaint& skPaint, |
| 109 const SkMatrix& viewMatrix, | 109 const SkMatrix& viewMatrix, |
| 110 const char text[], size_t byteLength, | 110 const char text[], size_t byteLength, |
| 111 SkScalar x, SkScalar y, const SkIRect& clipBounds)
{ | 111 SkScalar x, SkScalar y, const SkIRect& clipBounds)
{ |
| 112 ASSERT_SINGLE_OWNER | 112 ASSERT_SINGLE_OWNER |
| 113 RETURN_IF_ABANDONED | 113 RETURN_IF_ABANDONED |
| 114 SkDEBUGCODE(this->validate();) | 114 SkDEBUGCODE(this->validate();) |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 } | 844 } |
| 845 | 845 |
| 846 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { | 846 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { |
| 847 ASSERT_SINGLE_OWNER | 847 ASSERT_SINGLE_OWNER |
| 848 RETURN_IF_ABANDONED | 848 RETURN_IF_ABANDONED |
| 849 SkDEBUGCODE(this->validate();) | 849 SkDEBUGCODE(this->validate();) |
| 850 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); | 850 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); |
| 851 | 851 |
| 852 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); | 852 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); |
| 853 } | 853 } |
| OLD | NEW |