| 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 // Include here to ensure SK_SUPPORT_GPU is set correctly before it is examined. | 8 // Include here to ensure SK_SUPPORT_GPU is set correctly before it is examined. |
| 9 #include "SkTypes.h" | 9 #include "SkTypes.h" |
| 10 | 10 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 context->resetContext(); | 191 context->resetContext(); |
| 192 | 192 |
| 193 GrBackendTextureDesc desc; | 193 GrBackendTextureDesc desc; |
| 194 desc.fConfig = kBGRA_8888_GrPixelConfig; | 194 desc.fConfig = kBGRA_8888_GrPixelConfig; |
| 195 desc.fWidth = kW; | 195 desc.fWidth = kW; |
| 196 desc.fHeight = kH; | 196 desc.fHeight = kH; |
| 197 | 197 |
| 198 desc.fTextureHandle = texIDs[0]; | 198 desc.fTextureHandle = texIDs[0]; |
| 199 SkAutoTUnref<GrTexture> borrowed(context->textureProvider()->wrapBackendText
ure( | 199 SkAutoTUnref<GrTexture> borrowed(context->textureProvider()->wrapBackendText
ure( |
| 200 desc, kBorrow_GrWrapOwnership)); | 200 desc, kBorrow_GrWrapOwnership)); |
| 201 | 201 |
| 202 desc.fTextureHandle = texIDs[1]; | 202 desc.fTextureHandle = texIDs[1]; |
| 203 SkAutoTUnref<GrTexture> adopted(context->textureProvider()->wrapBackendTextu
re( | 203 SkAutoTUnref<GrTexture> adopted(context->textureProvider()->wrapBackendTextu
re( |
| 204 desc, kAdopt_GrWrapOwnership)); | 204 desc, kAdopt_GrWrapOwnership)); |
| 205 | 205 |
| 206 REPORTER_ASSERT(reporter, SkToBool(borrowed) && SkToBool(adopted)); | 206 REPORTER_ASSERT(reporter, SkToBool(borrowed) && SkToBool(adopted)); |
| 207 if (!SkToBool(borrowed) || !SkToBool(adopted)) { | 207 if (!SkToBool(borrowed) || !SkToBool(adopted)) { |
| 208 return; | 208 return; |
| 209 } | 209 } |
| 210 | 210 |
| 211 borrowed.reset(NULL); | 211 borrowed.reset(NULL); |
| 212 adopted.reset(NULL); | 212 adopted.reset(NULL); |
| 213 | 213 |
| 214 context->flush(); | 214 context->flush(); |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 test_scratch_key_consistency(reporter); | 1258 test_scratch_key_consistency(reporter); |
| 1259 test_purge_invalidated(reporter); | 1259 test_purge_invalidated(reporter); |
| 1260 test_cache_chained_purge(reporter); | 1260 test_cache_chained_purge(reporter); |
| 1261 test_resource_size_changed(reporter); | 1261 test_resource_size_changed(reporter); |
| 1262 test_timestamp_wrap(reporter); | 1262 test_timestamp_wrap(reporter); |
| 1263 test_flush(reporter); | 1263 test_flush(reporter); |
| 1264 test_large_resource_count(reporter); | 1264 test_large_resource_count(reporter); |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 #endif | 1267 #endif |
| OLD | NEW |