| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 "GrContext.h" | 9 #include "GrContext.h" |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 fDrawTarget->reset(); | 105 fDrawTarget->reset(); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 void GrContext::DrawingMgr::flush() { | 109 void GrContext::DrawingMgr::flush() { |
| 110 if (fDrawTarget) { | 110 if (fDrawTarget) { |
| 111 fDrawTarget->flush(); | 111 fDrawTarget->flush(); |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 GrDrawContext* GrContext::DrawingMgr::drawContext(const SkSurfaceProps* surfaceP
rops) { | 115 GrDrawContext* GrContext::DrawingMgr::drawContext(GrRenderTarget* rt, |
| 116 const SkSurfaceProps* surfaceP
rops) { |
| 116 if (this->abandoned()) { | 117 if (this->abandoned()) { |
| 117 return NULL; | 118 return NULL; |
| 118 } | 119 } |
| 119 | 120 |
| 120 const SkSurfaceProps props(SkSurfacePropsCopyOrDefault(surfaceProps)); | 121 const SkSurfaceProps props(SkSurfacePropsCopyOrDefault(surfaceProps)); |
| 121 | 122 |
| 122 SkASSERT(props.pixelGeometry() < kNumPixelGeometries); | 123 SkASSERT(props.pixelGeometry() < kNumPixelGeometries); |
| 123 if (!fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()]) { | 124 if (!fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()]) { |
| 124 fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()] = | 125 fDrawContext[props.pixelGeometry()][props.isUseDistanceFieldFonts()] = |
| 125 SkNEW_ARGS(GrDrawContext, (fContext, fDrawTarget, props)); | 126 SkNEW_ARGS(GrDrawContext, (fContext, fDrawTarget, props)); |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 ////////////////////////////////////////////////////////////////////////////// | 756 ////////////////////////////////////////////////////////////////////////////// |
| 756 | 757 |
| 757 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { | 758 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 758 fGpu->addGpuTraceMarker(marker); | 759 fGpu->addGpuTraceMarker(marker); |
| 759 } | 760 } |
| 760 | 761 |
| 761 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 762 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 762 fGpu->removeGpuTraceMarker(marker); | 763 fGpu->removeGpuTraceMarker(marker); |
| 763 } | 764 } |
| 764 | 765 |
| OLD | NEW |