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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 } | 744 } |
745 if (maxTextureBytes) { | 745 if (maxTextureBytes) { |
746 *maxTextureBytes = fResourceCache->getMaxResourceBytes(); | 746 *maxTextureBytes = fResourceCache->getMaxResourceBytes(); |
747 } | 747 } |
748 } | 748 } |
749 | 749 |
750 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ | 750 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ |
751 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 751 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
752 } | 752 } |
753 | 753 |
| 754 void GrContext::setTextBlobCacheLimit(size_t bytes) { |
| 755 fTextBlobCache->setBudget(bytes); |
| 756 } |
| 757 |
754 ////////////////////////////////////////////////////////////////////////////// | 758 ////////////////////////////////////////////////////////////////////////////// |
755 | 759 |
756 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { | 760 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { |
757 fGpu->addGpuTraceMarker(marker); | 761 fGpu->addGpuTraceMarker(marker); |
758 } | 762 } |
759 | 763 |
760 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 764 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
761 fGpu->removeGpuTraceMarker(marker); | 765 fGpu->removeGpuTraceMarker(marker); |
762 } | 766 } |
763 | 767 |
OLD | NEW |