| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/ws/frame_generator.h" | 5 #include "services/ui/ws/frame_generator.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/test/test_message_loop.h" | 9 #include "base/test/test_message_loop.h" |
| 10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 window->GetOrCreateSurfaceManager(); | 29 window->GetOrCreateSurfaceManager(); |
| 30 surface_manager->CreateSurface(mojom::SurfaceType::DEFAULT, | 30 surface_manager->CreateSurface(mojom::SurfaceType::DEFAULT, |
| 31 mojo::InterfaceRequest<mojom::Surface>(), | 31 mojo::InterfaceRequest<mojom::Surface>(), |
| 32 mojom::SurfaceClientPtr()); | 32 mojom::SurfaceClientPtr()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace | 35 } // namespace |
| 36 | 36 |
| 37 class FrameGeneratorTest : public testing::Test { | 37 class FrameGeneratorTest : public testing::Test { |
| 38 public: | 38 public: |
| 39 FrameGeneratorTest() : display_compositor_(new DisplayCompositor(nullptr)) {} | 39 FrameGeneratorTest() : display_compositor_(new DisplayCompositor()) {} |
| 40 ~FrameGeneratorTest() override {} | 40 ~FrameGeneratorTest() override {} |
| 41 | 41 |
| 42 // Calls DrawWindowTree() on |frame_generator_| | 42 // Calls DrawWindowTree() on |frame_generator_| |
| 43 void DrawWindowTree(cc::RenderPass* pass); | 43 void DrawWindowTree(cc::RenderPass* pass); |
| 44 | 44 |
| 45 ServerWindow* root_window() { | 45 ServerWindow* root_window() { |
| 46 return frame_generator_delegate_->GetRootWindow(); | 46 return frame_generator_delegate_->GetRootWindow(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 TestServerWindowDelegate* test_window_delegate() { return &window_delegate_; } | 49 TestServerWindowDelegate* test_window_delegate() { return &window_delegate_; } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 EXPECT_EQ(3u, quad_state_list->size()); | 123 EXPECT_EQ(3u, quad_state_list->size()); |
| 124 auto it = quad_state_list->begin(); | 124 auto it = quad_state_list->begin(); |
| 125 EXPECT_EQ(child_opacity * root_opacity, (*it)->opacity); | 125 EXPECT_EQ(child_opacity * root_opacity, (*it)->opacity); |
| 126 EXPECT_EQ(child_opacity * root_opacity, (*++it)->opacity); | 126 EXPECT_EQ(child_opacity * root_opacity, (*++it)->opacity); |
| 127 EXPECT_EQ(root_opacity, (*++it)->opacity); | 127 EXPECT_EQ(root_opacity, (*++it)->opacity); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace test | 130 } // namespace test |
| 131 } // namespace ws | 131 } // namespace ws |
| 132 } // namespace ui | 132 } // namespace ui |
| OLD | NEW |