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

Side by Side Diff: cc/layers/texture_layer_unittest.cc

Issue 13637017: Delete layout_viewport_size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 7 years, 8 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/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('j') | 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/layers/texture_layer.h" 5 #include "cc/layers/texture_layer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "cc/base/thread.h" 10 #include "cc/base/thread.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 root_->SetAnchorPoint(gfx::PointF()); 294 root_->SetAnchorPoint(gfx::PointF());
295 root_->SetBounds(bounds); 295 root_->SetBounds(bounds);
296 296
297 layer_ = TextureLayer::CreateForMailbox(); 297 layer_ = TextureLayer::CreateForMailbox();
298 layer_->SetIsDrawable(true); 298 layer_->SetIsDrawable(true);
299 layer_->SetAnchorPoint(gfx::PointF()); 299 layer_->SetAnchorPoint(gfx::PointF());
300 layer_->SetBounds(bounds); 300 layer_->SetBounds(bounds);
301 301
302 root_->AddChild(layer_); 302 root_->AddChild(layer_);
303 layer_tree_host()->SetRootLayer(root_); 303 layer_tree_host()->SetRootLayer(root_);
304 layer_tree_host()->SetViewportSize(bounds, bounds); 304 layer_tree_host()->SetViewportSize(bounds);
305 SetMailbox('1'); 305 SetMailbox('1');
306 EXPECT_EQ(0, callback_count_); 306 EXPECT_EQ(0, callback_count_);
307 307
308 // Case #1: change mailbox before the commit. The old mailbox should be 308 // Case #1: change mailbox before the commit. The old mailbox should be
309 // released immediately. 309 // released immediately.
310 SetMailbox('2'); 310 SetMailbox('2');
311 EXPECT_EQ(1, callback_count_); 311 EXPECT_EQ(1, callback_count_);
312 PostSetNeedsCommitToMainThread(); 312 PostSetNeedsCommitToMainThread();
313 } 313 }
314 314
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 // Used on either thread, protected by lock_. 582 // Used on either thread, protected by lock_.
583 base::Lock lock_; 583 base::Lock lock_;
584 unsigned expected_used_textures_on_commit_; 584 unsigned expected_used_textures_on_commit_;
585 }; 585 };
586 586
587 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerClientTest); 587 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerClientTest);
588 588
589 } // namespace 589 } // namespace
590 } // namespace cc 590 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698