OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "cc/debug/test_context_provider.h" | 8 #include "cc/debug/test_context_provider.h" |
9 #include "cc/debug/test_web_graphics_context_3d.h" | 9 #include "cc/debug/test_web_graphics_context_3d.h" |
10 #include "cc/layers/content_layer.h" | 10 #include "cc/layers/content_layer.h" |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 | 1257 |
1258 // Third child is the texture layer. | 1258 // Third child is the texture layer. |
1259 TextureLayerImpl* texture_impl = | 1259 TextureLayerImpl* texture_impl = |
1260 static_cast<TextureLayerImpl*>( | 1260 static_cast<TextureLayerImpl*>( |
1261 host_impl->active_tree()->root_layer()->children()[2]); | 1261 host_impl->active_tree()->root_layer()->children()[2]); |
1262 texture_impl->set_texture_id( | 1262 texture_impl->set_texture_id( |
1263 context_provider->Context3d()->createTexture()); | 1263 context_provider->Context3d()->createTexture()); |
1264 | 1264 |
1265 ResourceProvider::ResourceId texture = resource_provider->CreateResource( | 1265 ResourceProvider::ResourceId texture = resource_provider->CreateResource( |
1266 gfx::Size(4, 4), | 1266 gfx::Size(4, 4), |
1267 resource_provider->default_resource_type(), | |
1268 GL_CLAMP_TO_EDGE, | 1267 GL_CLAMP_TO_EDGE, |
1269 ResourceProvider::TextureUsageAny); | 1268 ResourceProvider::TextureUsageAny, |
| 1269 RGBA_8888); |
1270 ResourceProvider::ScopedWriteLockGL lock(resource_provider, texture); | 1270 ResourceProvider::ScopedWriteLockGL lock(resource_provider, texture); |
1271 | 1271 |
1272 gpu::Mailbox mailbox; | 1272 gpu::Mailbox mailbox; |
1273 context_provider->Context3d()->genMailboxCHROMIUM(mailbox.name); | 1273 context_provider->Context3d()->genMailboxCHROMIUM(mailbox.name); |
1274 unsigned sync_point = context_provider->Context3d()->insertSyncPoint(); | 1274 unsigned sync_point = context_provider->Context3d()->insertSyncPoint(); |
1275 | 1275 |
1276 color_video_frame_ = VideoFrame::CreateColorFrame( | 1276 color_video_frame_ = VideoFrame::CreateColorFrame( |
1277 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); | 1277 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); |
1278 hw_video_frame_ = VideoFrame::WrapNativeTexture( | 1278 hw_video_frame_ = VideoFrame::WrapNativeTexture( |
1279 new VideoFrame::MailboxHolder( | 1279 new VideoFrame::MailboxHolder( |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2161 RunTest(true, false, true); | 2161 RunTest(true, false, true); |
2162 } | 2162 } |
2163 | 2163 |
2164 TEST_F(UIResourceLostBeforeActivateTree, | 2164 TEST_F(UIResourceLostBeforeActivateTree, |
2165 RunMultiThread_DelegatingRenderer_ImplSidePaint) { | 2165 RunMultiThread_DelegatingRenderer_ImplSidePaint) { |
2166 RunTest(true, true, true); | 2166 RunTest(true, true, true); |
2167 } | 2167 } |
2168 | 2168 |
2169 } // namespace | 2169 } // namespace |
2170 } // namespace cc | 2170 } // namespace cc |
OLD | NEW |