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

Side by Side Diff: ui/compositor/layer_unittest.cc

Issue 2102123002: Make Satisfy/Require callbacks pass Surface id and sequence by reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 | « third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 1504
1505 // Resize layer. 1505 // Resize layer.
1506 child->SetBounds(gfx::Rect(200, 200, 400, 400)); 1506 child->SetBounds(gfx::Rect(200, 200, 400, 400));
1507 child->SetVisible(true); 1507 child->SetVisible(true);
1508 DrawTree(root.get()); 1508 DrawTree(root.get());
1509 EXPECT_TRUE(delegate.painted()); 1509 EXPECT_TRUE(delegate.painted());
1510 } 1510 }
1511 1511
1512 namespace { 1512 namespace {
1513 1513
1514 void FakeSatisfyCallback(cc::SurfaceSequence) {} 1514 void FakeSatisfyCallback(const cc::SurfaceSequence&) {}
1515 1515
1516 void FakeRequireCallback(cc::SurfaceId, cc::SurfaceSequence) {} 1516 void FakeRequireCallback(const cc::SurfaceId&, const cc::SurfaceSequence&) {}
1517 1517
1518 } // namespace 1518 } // namespace
1519 1519
1520 TEST_F(LayerWithDelegateTest, ExternalContent) { 1520 TEST_F(LayerWithDelegateTest, ExternalContent) {
1521 std::unique_ptr<Layer> root( 1521 std::unique_ptr<Layer> root(
1522 CreateNoTextureLayer(gfx::Rect(0, 0, 1000, 1000))); 1522 CreateNoTextureLayer(gfx::Rect(0, 0, 1000, 1000)));
1523 std::unique_ptr<Layer> child(CreateLayer(LAYER_SOLID_COLOR)); 1523 std::unique_ptr<Layer> child(CreateLayer(LAYER_SOLID_COLOR));
1524 1524
1525 child->SetBounds(gfx::Rect(0, 0, 10, 10)); 1525 child->SetBounds(gfx::Rect(0, 0, 10, 10));
1526 child->SetVisible(true); 1526 child->SetVisible(true);
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 root->SetOpacity(0.5f); 1904 root->SetOpacity(0.5f);
1905 WaitForSwap(); 1905 WaitForSwap();
1906 EXPECT_EQ(1u, animation_observer.animation_step_count()); 1906 EXPECT_EQ(1u, animation_observer.animation_step_count());
1907 1907
1908 EXPECT_FALSE(animation_observer.shutdown()); 1908 EXPECT_FALSE(animation_observer.shutdown());
1909 ResetCompositor(); 1909 ResetCompositor();
1910 EXPECT_TRUE(animation_observer.shutdown()); 1910 EXPECT_TRUE(animation_observer.shutdown());
1911 } 1911 }
1912 1912
1913 } // namespace ui 1913 } // namespace ui
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698