Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: tests/ResourceCacheTest.cpp

Issue 848903004: Require budget decision when creating a RenderTarget SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address initial comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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,
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
OLDNEW
« no previous file with comments | « tests/ReadWriteAlphaTest.cpp ('k') | tests/SurfaceTest.cpp » ('j') | tests/SurfaceTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698