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

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

Issue 2776973004: Remove CompositorObserver::OnCompositingEnded() (Closed)
Patch Set: Rename commited_frame_number_ to activated_frame_count_ and move increments back to DidReceiveCompo… Created 3 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 | « ui/compositor/compositor_observer.h ('k') | ui/compositor/layer.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #else 107 #else
108 #define MAYBE_CreateAndReleaseOutputSurface CreateAndReleaseOutputSurface 108 #define MAYBE_CreateAndReleaseOutputSurface CreateAndReleaseOutputSurface
109 #endif 109 #endif
110 TEST_F(CompositorTest, MAYBE_CreateAndReleaseOutputSurface) { 110 TEST_F(CompositorTest, MAYBE_CreateAndReleaseOutputSurface) {
111 std::unique_ptr<Layer> root_layer(new Layer(ui::LAYER_SOLID_COLOR)); 111 std::unique_ptr<Layer> root_layer(new Layer(ui::LAYER_SOLID_COLOR));
112 root_layer->SetBounds(gfx::Rect(10, 10)); 112 root_layer->SetBounds(gfx::Rect(10, 10));
113 compositor()->SetRootLayer(root_layer.get()); 113 compositor()->SetRootLayer(root_layer.get());
114 compositor()->SetScaleAndSize(1.0f, gfx::Size(10, 10)); 114 compositor()->SetScaleAndSize(1.0f, gfx::Size(10, 10));
115 DCHECK(compositor()->IsVisible()); 115 DCHECK(compositor()->IsVisible());
116 compositor()->ScheduleDraw(); 116 compositor()->ScheduleDraw();
117 DrawWaiterForTest::WaitForCompositingEnded(compositor()); 117 DrawWaiterForTest::WaitForCompositingStarted(compositor());
118 compositor()->SetVisible(false); 118 compositor()->SetVisible(false);
119 EXPECT_EQ(gfx::kNullAcceleratedWidget, 119 EXPECT_EQ(gfx::kNullAcceleratedWidget,
120 compositor()->ReleaseAcceleratedWidget()); 120 compositor()->ReleaseAcceleratedWidget());
121 compositor()->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); 121 compositor()->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
122 compositor()->SetVisible(true); 122 compositor()->SetVisible(true);
123 compositor()->ScheduleDraw(); 123 compositor()->ScheduleDraw();
124 DrawWaiterForTest::WaitForCompositingEnded(compositor()); 124 DrawWaiterForTest::WaitForCompositingStarted(compositor());
125 compositor()->SetRootLayer(nullptr); 125 compositor()->SetRootLayer(nullptr);
126 } 126 }
127 127
128 } // namespace ui 128 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor_observer.h ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698