| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge); | 1247 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge); |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 #if USE_IOSURFACE_FOR_2D_CANVAS | 1250 #if USE_IOSURFACE_FOR_2D_CANVAS |
| 1251 TEST_F(Canvas2DLayerBridgeTest, DeleteIOSurfaceAfterTeardown) | 1251 TEST_F(Canvas2DLayerBridgeTest, DeleteIOSurfaceAfterTeardown) |
| 1252 #else | 1252 #else |
| 1253 TEST_F(Canvas2DLayerBridgeTest, DISABLED_DeleteIOSurfaceAfterTeardown) | 1253 TEST_F(Canvas2DLayerBridgeTest, DISABLED_DeleteIOSurfaceAfterTeardown) |
| 1254 #endif | 1254 #endif |
| 1255 { | 1255 { |
| 1256 FakeGLES2InterfaceWithImageSupport gl; | 1256 FakeGLES2InterfaceWithImageSupport gl; |
| 1257 FakePlatformSupport testingPlatformSupport; | 1257 ScopedTestingPlatformSupport<FakePlatformSupport> testingPlatformSupport( |
| 1258 new FakePlatformSupport); |
| 1258 std::unique_ptr<FakeWebGraphicsContext3DProvider> contextProvider = | 1259 std::unique_ptr<FakeWebGraphicsContext3DProvider> contextProvider = |
| 1259 WTF::wrapUnique(new FakeWebGraphicsContext3DProvider(&gl)); | 1260 WTF::wrapUnique(new FakeWebGraphicsContext3DProvider(&gl)); |
| 1260 | 1261 |
| 1261 cc::TextureMailbox textureMailbox; | 1262 cc::TextureMailbox textureMailbox; |
| 1262 std::unique_ptr<cc::SingleReleaseCallback> releaseCallback; | 1263 std::unique_ptr<cc::SingleReleaseCallback> releaseCallback; |
| 1263 | 1264 |
| 1264 { | 1265 { |
| 1265 Canvas2DLayerBridgePtr bridge(adoptRef(new Canvas2DLayerBridge( | 1266 Canvas2DLayerBridgePtr bridge(adoptRef(new Canvas2DLayerBridge( |
| 1266 std::move(contextProvider), IntSize(300, 150), 0, NonOpaque, | 1267 std::move(contextProvider), IntSize(300, 150), 0, NonOpaque, |
| 1267 Canvas2DLayerBridge::ForceAccelerationForTesting, nullptr, | 1268 Canvas2DLayerBridge::ForceAccelerationForTesting, nullptr, |
| 1268 kN32_SkColorType))); | 1269 kN32_SkColorType))); |
| 1269 bridge->PrepareTextureMailbox(&textureMailbox, &releaseCallback); | 1270 bridge->PrepareTextureMailbox(&textureMailbox, &releaseCallback); |
| 1270 } | 1271 } |
| 1271 | 1272 |
| 1272 bool lostResource = false; | 1273 bool lostResource = false; |
| 1273 releaseCallback->Run(gpu::SyncToken(), lostResource); | 1274 releaseCallback->Run(gpu::SyncToken(), lostResource); |
| 1274 | 1275 |
| 1275 EXPECT_EQ(1u, gl.createImageCount()); | 1276 EXPECT_EQ(1u, gl.createImageCount()); |
| 1276 EXPECT_EQ(1u, gl.destroyImageCount()); | 1277 EXPECT_EQ(1u, gl.destroyImageCount()); |
| 1277 } | 1278 } |
| 1278 | 1279 |
| 1279 } // namespace blink | 1280 } // namespace blink |
| OLD | NEW |