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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 fDrawTargets[i]->reset(); | 93 fDrawTargets[i]->reset(); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 void GrDrawingManager::flush() { | 97 void GrDrawingManager::flush() { |
98 SkDEBUGCODE(bool result =) | 98 SkDEBUGCODE(bool result =) |
99 SkTTopoSort<GrDrawTarget, GrDrawTarget::TopoSortTraits>(
&fDrawTargets); | 99 SkTTopoSort<GrDrawTarget, GrDrawTarget::TopoSortTraits>(
&fDrawTargets); |
100 SkASSERT(result); | 100 SkASSERT(result); |
101 | 101 |
102 for (int i = 0; i < fDrawTargets.count(); ++i) { | 102 for (int i = 0; i < fDrawTargets.count(); ++i) { |
| 103 //SkDEBUGCODE(fDrawTargets[i]->dump();) |
103 fDrawTargets[i]->flush(); | 104 fDrawTargets[i]->flush(); |
104 } | 105 } |
105 | 106 |
106 #ifndef ENABLE_MDB | 107 #ifndef ENABLE_MDB |
107 // When MDB is disabled we keep reusing the same drawTarget | 108 // When MDB is disabled we keep reusing the same drawTarget |
108 if (fDrawTargets.count()) { | 109 if (fDrawTargets.count()) { |
109 SkASSERT(fDrawTargets.count() == 1); | 110 SkASSERT(fDrawTargets.count() == 1); |
110 fDrawTargets[0]->resetFlag(GrDrawTarget::kWasOutput_Flag); | 111 fDrawTargets[0]->resetFlag(GrDrawTarget::kWasOutput_Flag); |
111 } | 112 } |
112 #endif | 113 #endif |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 809 |
809 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ | 810 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ |
810 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 811 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
811 } | 812 } |
812 | 813 |
813 ////////////////////////////////////////////////////////////////////////////// | 814 ////////////////////////////////////////////////////////////////////////////// |
814 | 815 |
815 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 816 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
816 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 817 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
817 } | 818 } |
OLD | NEW |