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

Side by Side Diff: tests/TextBlobCacheTest.cpp

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome Created 4 years, 10 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
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | tests/TextureStorageAllocator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "sk_tool_utils.h" 8 #include "sk_tool_utils.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 uint32_t flags = 0; 59 uint32_t flags = 0;
60 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); 60 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
61 61
62 // configure our context for maximum stressing of cache and atlas 62 // configure our context for maximum stressing of cache and atlas
63 if (stressTest) { 63 if (stressTest) {
64 GrTest::SetupAlwaysEvictAtlas(context); 64 GrTest::SetupAlwaysEvictAtlas(context);
65 context->setTextBlobCacheLimit_ForTesting(0); 65 context->setTextBlobCacheLimit_ForTesting(0);
66 } 66 }
67 67
68 SkImageInfo info = SkImageInfo::Make(kWidth, kHeight, kN32_SkColorType, kPre mul_SkAlphaType); 68 SkImageInfo info = SkImageInfo::Make(kWidth, kHeight, kN32_SkColorType, kPre mul_SkAlphaType);
69 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, SkSurfac e::kNo_Budgeted, info, 69 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, SkBudget ed::kNo, info,
70 0, &props)); 70 0, &props));
71 REPORTER_ASSERT(reporter, surface); 71 REPORTER_ASSERT(reporter, surface);
72 if (!surface) { 72 if (!surface) {
73 return; 73 return;
74 } 74 }
75 75
76 SkCanvas* canvas = surface->getCanvas(); 76 SkCanvas* canvas = surface->getCanvas();
77 77
78 SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault()); 78 SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
79 79
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobAbnormal, reporter, context) { 168 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobAbnormal, reporter, context) {
169 text_blob_cache_inner(reporter, context, 256, 256, 10, false, false); 169 text_blob_cache_inner(reporter, context, 256, 256, 10, false, false);
170 } 170 }
171 171
172 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobStressAbnormal, reporter, context) { 172 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobStressAbnormal, reporter, context) {
173 text_blob_cache_inner(reporter, context, 256, 256, 10, false, true); 173 text_blob_cache_inner(reporter, context, 256, 256, 10, false, true);
174 } 174 }
175 #endif 175 #endif
OLDNEW
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | tests/TextureStorageAllocator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698