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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 fDrawContext = SkNEW_ARGS(GrDrawContext, (context, fDrawTarget)); | 71 fDrawContext = SkNEW_ARGS(GrDrawContext, (context, fDrawTarget)); |
72 } | 72 } |
73 | 73 |
74 GrContext::DrawingMgr::~DrawingMgr() { | 74 GrContext::DrawingMgr::~DrawingMgr() { |
75 SkSafeUnref(fDrawTarget); | 75 SkSafeUnref(fDrawTarget); |
76 SkSafeUnref(fDrawContext); | 76 SkSafeUnref(fDrawContext); |
77 } | 77 } |
78 | 78 |
79 void GrContext::DrawingMgr::abandon() { | 79 void GrContext::DrawingMgr::abandon() { |
80 SkSafeSetNull(fDrawTarget); | 80 SkSafeSetNull(fDrawTarget); |
81 fDrawContext->fDrawTarget.reset(NULL); | 81 SkSafeSetNull(fDrawContext->fDrawTarget); |
82 SkSafeSetNull(fDrawContext); | 82 SkSafeSetNull(fDrawContext); |
83 } | 83 } |
84 | 84 |
85 void GrContext::DrawingMgr::purgeResources() { | 85 void GrContext::DrawingMgr::purgeResources() { |
86 if (fDrawTarget) { | 86 if (fDrawTarget) { |
87 fDrawTarget->purgeResources(); | 87 fDrawTarget->purgeResources(); |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 void GrContext::DrawingMgr::reset() { | 91 void GrContext::DrawingMgr::reset() { |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 ////////////////////////////////////////////////////////////////////////////// | 770 ////////////////////////////////////////////////////////////////////////////// |
771 | 771 |
772 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { | 772 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { |
773 fGpu->addGpuTraceMarker(marker); | 773 fGpu->addGpuTraceMarker(marker); |
774 } | 774 } |
775 | 775 |
776 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 776 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
777 fGpu->removeGpuTraceMarker(marker); | 777 fGpu->removeGpuTraceMarker(marker); |
778 } | 778 } |
779 | 779 |
OLD | NEW |