Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 22529002: [cc] Allow resources and ui resources to specify wrap mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix botched resolve Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(), 1267 resource_provider->default_resource_type(),
1268 GL_CLAMP_TO_EDGE,
1268 ResourceProvider::TextureUsageAny); 1269 ResourceProvider::TextureUsageAny);
1269 ResourceProvider::ScopedWriteLockGL lock(resource_provider, texture); 1270 ResourceProvider::ScopedWriteLockGL lock(resource_provider, texture);
1270 1271
1271 gpu::Mailbox mailbox; 1272 gpu::Mailbox mailbox;
1272 context_provider->Context3d()->genMailboxCHROMIUM(mailbox.name); 1273 context_provider->Context3d()->genMailboxCHROMIUM(mailbox.name);
1273 unsigned sync_point = context_provider->Context3d()->insertSyncPoint(); 1274 unsigned sync_point = context_provider->Context3d()->insertSyncPoint();
1274 1275
1275 color_video_frame_ = VideoFrame::CreateColorFrame( 1276 color_video_frame_ = VideoFrame::CreateColorFrame(
1276 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); 1277 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
1277 hw_video_frame_ = VideoFrame::WrapNativeTexture( 1278 hw_video_frame_ = VideoFrame::WrapNativeTexture(
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 RunTest(true, false, true); 1900 RunTest(true, false, true);
1900 } 1901 }
1901 1902
1902 TEST_F(UIResourceLostBeforeActivateTree, 1903 TEST_F(UIResourceLostBeforeActivateTree,
1903 RunMultiThread_DelegatingRenderer_ImplSidePaint) { 1904 RunMultiThread_DelegatingRenderer_ImplSidePaint) {
1904 RunTest(true, true, true); 1905 RunTest(true, true, true);
1905 } 1906 }
1906 1907
1907 } // namespace 1908 } // namespace
1908 } // namespace cc 1909 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698