| OLD | NEW |
| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 254 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
| 255 if (NULL == context) { | 255 if (NULL == context) { |
| 256 return; | 256 return; |
| 257 } | 257 } |
| 258 GrSurfaceDesc desc; | 258 GrSurfaceDesc desc; |
| 259 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 259 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 260 desc.fWidth = 800; | 260 desc.fWidth = 800; |
| 261 desc.fHeight = 800; | 261 desc.fHeight = 800; |
| 262 desc.fConfig = kSkia8888_GrPixelConfig; | 262 desc.fConfig = kSkia8888_GrPixelConfig; |
| 263 desc.fOrigin = kTopLeft_GrSurfaceOrigin; | 263 desc.fOrigin = kTopLeft_GrSurfaceOrigin; |
| 264 SkAutoTUnref<GrTexture> texture(context->textureProvider()->refScratchTextur
e(desc, | 264 SkAutoTUnref<GrTexture> texture(context->textureProvider()->createApproxText
ure(desc)); |
| 265 GrTextureProvider::kExact_ScratchTexMatch)); | |
| 266 GrTestTarget tt; | 265 GrTestTarget tt; |
| 267 context->getTestTarget(&tt); | 266 context->getTestTarget(&tt); |
| 268 GrRenderTarget* rt = texture->asRenderTarget(); | 267 GrRenderTarget* rt = texture->asRenderTarget(); |
| 269 GrDrawTarget* dt = tt.target(); | 268 GrDrawTarget* dt = tt.target(); |
| 270 GrResourceProvider* rp = tt.resourceProvider(); | 269 GrResourceProvider* rp = tt.resourceProvider(); |
| 271 | 270 |
| 272 test_path(dt, rt, rp, create_path_0()); | 271 test_path(dt, rt, rp, create_path_0()); |
| 273 test_path(dt, rt, rp, create_path_1()); | 272 test_path(dt, rt, rp, create_path_1()); |
| 274 test_path(dt, rt, rp, create_path_2()); | 273 test_path(dt, rt, rp, create_path_2()); |
| 275 test_path(dt, rt, rp, create_path_3()); | 274 test_path(dt, rt, rp, create_path_3()); |
| 276 test_path(dt, rt, rp, create_path_4()); | 275 test_path(dt, rt, rp, create_path_4()); |
| 277 test_path(dt, rt, rp, create_path_5()); | 276 test_path(dt, rt, rp, create_path_5()); |
| 278 test_path(dt, rt, rp, create_path_6()); | 277 test_path(dt, rt, rp, create_path_6()); |
| 279 test_path(dt, rt, rp, create_path_7()); | 278 test_path(dt, rt, rp, create_path_7()); |
| 280 test_path(dt, rt, rp, create_path_8()); | 279 test_path(dt, rt, rp, create_path_8()); |
| 281 test_path(dt, rt, rp, create_path_9()); | 280 test_path(dt, rt, rp, create_path_9()); |
| 282 test_path(dt, rt, rp, create_path_10()); | 281 test_path(dt, rt, rp, create_path_10()); |
| 283 test_path(dt, rt, rp, create_path_11()); | 282 test_path(dt, rt, rp, create_path_11()); |
| 284 test_path(dt, rt, rp, create_path_12()); | 283 test_path(dt, rt, rp, create_path_12()); |
| 285 test_path(dt, rt, rp, create_path_13()); | 284 test_path(dt, rt, rp, create_path_13()); |
| 286 test_path(dt, rt, rp, create_path_14()); | 285 test_path(dt, rt, rp, create_path_14()); |
| 287 test_path(dt, rt, rp, create_path_15()); | 286 test_path(dt, rt, rp, create_path_15()); |
| 288 } | 287 } |
| 289 #endif | 288 #endif |
| OLD | NEW |