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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 if (!rt) { | 648 if (!rt) { |
649 return nullptr; | 649 return nullptr; |
650 } | 650 } |
651 | 651 |
652 return fContext->drawingManager()->makeDrawContext(std::move(rt), | 652 return fContext->drawingManager()->makeDrawContext(std::move(rt), |
653 std::move(colorSpace), | 653 std::move(colorSpace), |
654 surfaceProps); | 654 surfaceProps); |
655 } | 655 } |
656 | 656 |
657 sk_sp<GrDrawContext> GrContextPriv::makeBackendTextureAsRenderTargetDrawContext( | 657 sk_sp<GrDrawContext> GrContextPriv::makeBackendTextureAsRenderTargetDrawContext( |
658 const GrBackendTextureDesc&
desc, | 658 const GrBackendTextureDesc&
desc, |
659 sk_sp<SkColorSpace> colorSp
ace, | 659 sk_sp<SkColorSpace> colorSp
ace, |
660 const SkSurfaceProps* surfa
ceProps) { | 660 const SkSurfaceProps* surfa
ceProps) { |
661 ASSERT_SINGLE_OWNER_PRIV | 661 ASSERT_SINGLE_OWNER_PRIV |
662 SkASSERT(desc.fFlags & kRenderTarget_GrBackendTextureFlag); | 662 SkASSERT(desc.fFlags & kRenderTarget_GrBackendTextureFlag); |
663 | 663 |
664 sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTextureAsR
enderTarget(desc)); | 664 sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTextureAsR
enderTarget(desc)); |
665 if (!surface) { | 665 if (!surface) { |
666 return nullptr; | 666 return nullptr; |
667 } | 667 } |
668 | 668 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 ASSERT_SINGLE_OWNER | 787 ASSERT_SINGLE_OWNER |
788 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 788 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
789 } | 789 } |
790 | 790 |
791 ////////////////////////////////////////////////////////////////////////////// | 791 ////////////////////////////////////////////////////////////////////////////// |
792 | 792 |
793 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 793 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
794 ASSERT_SINGLE_OWNER | 794 ASSERT_SINGLE_OWNER |
795 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 795 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
796 } | 796 } |
OLD | NEW |