| 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 28 matching lines...) Expand all Loading... |
| 39 GrDrawTarget* drawTarget, | 39 GrDrawTarget* drawTarget, |
| 40 const SkSurfaceProps& surfaceProps) | 40 const SkSurfaceProps& surfaceProps) |
| 41 : fContext(context) | 41 : fContext(context) |
| 42 , fDrawTarget(SkRef(drawTarget)) | 42 , fDrawTarget(SkRef(drawTarget)) |
| 43 , fTextContext(NULL) | 43 , fTextContext(NULL) |
| 44 , fSurfaceProps(surfaceProps) { | 44 , fSurfaceProps(surfaceProps) { |
| 45 } | 45 } |
| 46 | 46 |
| 47 GrDrawContext::~GrDrawContext() { | 47 GrDrawContext::~GrDrawContext() { |
| 48 SkSafeUnref(fDrawTarget); | 48 SkSafeUnref(fDrawTarget); |
| 49 SkDELETE(fTextContext); | 49 delete fTextContext; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void GrDrawContext::copySurface(GrRenderTarget* dst, GrSurface* src, | 52 void GrDrawContext::copySurface(GrRenderTarget* dst, GrSurface* src, |
| 53 const SkIRect& srcRect, const SkIPoint& dstPoint
) { | 53 const SkIRect& srcRect, const SkIPoint& dstPoint
) { |
| 54 if (!this->prepareToDraw(dst)) { | 54 if (!this->prepareToDraw(dst)) { |
| 55 return; | 55 return; |
| 56 } | 56 } |
| 57 | 57 |
| 58 fDrawTarget->copySurface(dst, src, srcRect, dstPoint); | 58 fDrawTarget->copySurface(dst, src, srcRect, dstPoint); |
| 59 } | 59 } |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 RETURN_FALSE_IF_ABANDONED | 760 RETURN_FALSE_IF_ABANDONED |
| 761 | 761 |
| 762 ASSERT_OWNED_RESOURCE(rt); | 762 ASSERT_OWNED_RESOURCE(rt); |
| 763 SkASSERT(rt); | 763 SkASSERT(rt); |
| 764 return true; | 764 return true; |
| 765 } | 765 } |
| 766 | 766 |
| 767 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { | 767 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { |
| 768 fDrawTarget->drawBatch(*pipelineBuilder, batch); | 768 fDrawTarget->drawBatch(*pipelineBuilder, batch); |
| 769 } | 769 } |
| OLD | NEW |