OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #if SK_SUPPORT_GPU | 8 #if SK_SUPPORT_GPU |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
790 GrContext* context = factory->get(glType); | 790 GrContext* context = factory->get(glType); |
791 if (NULL == context) { | 791 if (NULL == context) { |
792 continue; | 792 continue; |
793 } | 793 } |
794 GrSurfaceDesc desc; | 794 GrSurfaceDesc desc; |
795 desc.fConfig = kSkia8888_GrPixelConfig; | 795 desc.fConfig = kSkia8888_GrPixelConfig; |
796 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 796 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
797 desc.fWidth = gWidth; | 797 desc.fWidth = gWidth; |
798 desc.fHeight = gHeight; | 798 desc.fHeight = gHeight; |
799 SkImageInfo info = SkImageInfo::MakeN32Premul(gWidth, gHeight); | 799 SkImageInfo info = SkImageInfo::MakeN32Premul(gWidth, gHeight); |
800 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, info )); | 800 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, |
robertphillips
2015/01/15 21:30:36
tab over ?
bsalomon
2015/01/15 22:15:50
Done.
| |
801 SkSurface::kNo_Budgeted, info)); | |
801 test_cache(reporter, context, surface->getCanvas()); | 802 test_cache(reporter, context, surface->getCanvas()); |
802 } | 803 } |
803 | 804 |
804 // The below tests create their own mock contexts. | 805 // The below tests create their own mock contexts. |
805 test_no_key(reporter); | 806 test_no_key(reporter); |
806 test_budgeting(reporter); | 807 test_budgeting(reporter); |
807 test_unbudgeted(reporter); | 808 test_unbudgeted(reporter); |
808 test_duplicate_content_key(reporter); | 809 test_duplicate_content_key(reporter); |
809 test_duplicate_scratch_key(reporter); | 810 test_duplicate_scratch_key(reporter); |
810 test_remove_scratch_key(reporter); | 811 test_remove_scratch_key(reporter); |
811 test_purge_invalidated(reporter); | 812 test_purge_invalidated(reporter); |
812 test_cache_chained_purge(reporter); | 813 test_cache_chained_purge(reporter); |
813 test_resource_size_changed(reporter); | 814 test_resource_size_changed(reporter); |
814 test_large_resource_count(reporter); | 815 test_large_resource_count(reporter); |
815 } | 816 } |
816 | 817 |
817 #endif | 818 #endif |
OLD | NEW |