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

Side by Side Diff: tests/TessellatingPathRendererTests.cpp

Issue 1107973004: Pull cache out of GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixpicturerenderer.cpp Created 5 years, 7 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/WritePixelsTest.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 "SkPath.h" 8 #include "SkPath.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0)); 244 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0));
245 if (NULL == context) { 245 if (NULL == context) {
246 return; 246 return;
247 } 247 }
248 GrSurfaceDesc desc; 248 GrSurfaceDesc desc;
249 desc.fFlags = kRenderTarget_GrSurfaceFlag; 249 desc.fFlags = kRenderTarget_GrSurfaceFlag;
250 desc.fWidth = 800; 250 desc.fWidth = 800;
251 desc.fHeight = 800; 251 desc.fHeight = 800;
252 desc.fConfig = kSkia8888_GrPixelConfig; 252 desc.fConfig = kSkia8888_GrPixelConfig;
253 desc.fOrigin = kTopLeft_GrSurfaceOrigin; 253 desc.fOrigin = kTopLeft_GrSurfaceOrigin;
254 SkAutoTUnref<GrTexture> texture( 254 SkAutoTUnref<GrTexture> texture(context->textureProvider()->refScratchTextur e(desc,
255 context->refScratchTexture(desc, GrContext::kExact_ScratchTexMatch) 255 GrTextureProvider::kExact_ScratchTexMatch));
256 );
257 GrTestTarget tt; 256 GrTestTarget tt;
258 context->getTestTarget(&tt); 257 context->getTestTarget(&tt);
259 GrRenderTarget* rt = texture->asRenderTarget(); 258 GrRenderTarget* rt = texture->asRenderTarget();
260 GrDrawTarget* dt = tt.target(); 259 GrDrawTarget* dt = tt.target();
261 260
262 test_path(dt, rt, create_path_0()); 261 test_path(dt, rt, create_path_0());
263 test_path(dt, rt, create_path_1()); 262 test_path(dt, rt, create_path_1());
264 test_path(dt, rt, create_path_2()); 263 test_path(dt, rt, create_path_2());
265 test_path(dt, rt, create_path_3()); 264 test_path(dt, rt, create_path_3());
266 test_path(dt, rt, create_path_4()); 265 test_path(dt, rt, create_path_4());
267 test_path(dt, rt, create_path_5()); 266 test_path(dt, rt, create_path_5());
268 test_path(dt, rt, create_path_6()); 267 test_path(dt, rt, create_path_6());
269 test_path(dt, rt, create_path_7()); 268 test_path(dt, rt, create_path_7());
270 test_path(dt, rt, create_path_8()); 269 test_path(dt, rt, create_path_8());
271 test_path(dt, rt, create_path_9()); 270 test_path(dt, rt, create_path_9());
272 test_path(dt, rt, create_path_10()); 271 test_path(dt, rt, create_path_10());
273 test_path(dt, rt, create_path_11()); 272 test_path(dt, rt, create_path_11());
274 test_path(dt, rt, create_path_12()); 273 test_path(dt, rt, create_path_12());
275 test_path(dt, rt, create_path_13()); 274 test_path(dt, rt, create_path_13());
276 test_path(dt, rt, create_path_14()); 275 test_path(dt, rt, create_path_14());
277 test_path(dt, rt, create_path_15()); 276 test_path(dt, rt, create_path_15());
278 } 277 }
279 #endif 278 #endif
OLDNEW
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | tests/WritePixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698