OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrContext.h" | 8 #include "GrContext.h" |
9 #include "GrContextPriv.h" | 9 #include "GrContextPriv.h" |
10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
(...skipping 576 matching lines...) Loading... |
587 } | 587 } |
588 | 588 |
589 void GrContext::flushSurfaceWrites(GrSurface* surface) { | 589 void GrContext::flushSurfaceWrites(GrSurface* surface) { |
590 ASSERT_SINGLE_OWNER | 590 ASSERT_SINGLE_OWNER |
591 RETURN_IF_ABANDONED | 591 RETURN_IF_ABANDONED |
592 if (surface->surfacePriv().hasPendingWrite()) { | 592 if (surface->surfacePriv().hasPendingWrite()) { |
593 this->flush(); | 593 this->flush(); |
594 } | 594 } |
595 } | 595 } |
596 | 596 |
| 597 void GrContext::flushSurfaceIO(GrSurface* surface) { |
| 598 ASSERT_SINGLE_OWNER |
| 599 RETURN_IF_ABANDONED |
| 600 if (surface->surfacePriv().hasPendingIO()) { |
| 601 this->flush(); |
| 602 } |
| 603 } |
| 604 |
597 //////////////////////////////////////////////////////////////////////////////// | 605 //////////////////////////////////////////////////////////////////////////////// |
598 int GrContext::getRecommendedSampleCount(GrPixelConfig config, | 606 int GrContext::getRecommendedSampleCount(GrPixelConfig config, |
599 SkScalar dpi) const { | 607 SkScalar dpi) const { |
600 ASSERT_SINGLE_OWNER | 608 ASSERT_SINGLE_OWNER |
601 | 609 |
602 if (!this->caps()->isConfigRenderable(config, true)) { | 610 if (!this->caps()->isConfigRenderable(config, true)) { |
603 return 0; | 611 return 0; |
604 } | 612 } |
605 int chosenSampleCount = 0; | 613 int chosenSampleCount = 0; |
606 if (fGpu->caps()->shaderCaps()->pathRenderingSupport()) { | 614 if (fGpu->caps()->shaderCaps()->pathRenderingSupport()) { |
(...skipping 180 matching lines...) Loading... |
787 ASSERT_SINGLE_OWNER | 795 ASSERT_SINGLE_OWNER |
788 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 796 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
789 } | 797 } |
790 | 798 |
791 ////////////////////////////////////////////////////////////////////////////// | 799 ////////////////////////////////////////////////////////////////////////////// |
792 | 800 |
793 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 801 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
794 ASSERT_SINGLE_OWNER | 802 ASSERT_SINGLE_OWNER |
795 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 803 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
796 } | 804 } |
OLD | NEW |