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 "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 if (NULL == context) { | 291 if (NULL == context) { |
292 continue; | 292 continue; |
293 } | 293 } |
294 | 294 |
295 GrTextureDesc desc; | 295 GrTextureDesc desc; |
296 desc.fConfig = kSkia8888_GrPixelConfig; | 296 desc.fConfig = kSkia8888_GrPixelConfig; |
297 desc.fFlags = kRenderTarget_GrTextureFlagBit; | 297 desc.fFlags = kRenderTarget_GrTextureFlagBit; |
298 desc.fWidth = gWidth; | 298 desc.fWidth = gWidth; |
299 desc.fHeight = gHeight; | 299 desc.fHeight = gHeight; |
300 SkImageInfo info = SkImageInfo::MakeN32Premul(gWidth, gHeight); | 300 SkImageInfo info = SkImageInfo::MakeN32Premul(gWidth, gHeight); |
301 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, info
, 0)); | 301 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, info
)); |
302 | 302 |
303 test_cache(reporter, context, surface->getCanvas()); | 303 test_cache(reporter, context, surface->getCanvas()); |
304 test_purge_invalidated(reporter, context); | 304 test_purge_invalidated(reporter, context); |
305 test_cache_delete_on_destruction(reporter, context); | 305 test_cache_delete_on_destruction(reporter, context); |
306 test_resource_size_changed(reporter, context); | 306 test_resource_size_changed(reporter, context); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 #endif | 310 #endif |
OLD | NEW |