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

Side by Side Diff: services/ui/ws/frame_generator_unittest.cc

Issue 2176303002: services/ui: Remove deprecated gpu code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 years, 4 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 | « services/ui/ws/frame_generator.cc ('k') | services/ui/ws/platform_display.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 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"
11 #include "cc/quads/shared_quad_state.h" 11 #include "cc/quads/shared_quad_state.h"
12 #include "services/ui/gles2/gpu_state.h"
13 #include "services/ui/ws/platform_display_init_params.h" 12 #include "services/ui/ws/platform_display_init_params.h"
14 #include "services/ui/ws/server_window.h" 13 #include "services/ui/ws/server_window.h"
15 #include "services/ui/ws/server_window_surface_manager.h" 14 #include "services/ui/ws/server_window_surface_manager.h"
16 #include "services/ui/ws/test_server_window_delegate.h" 15 #include "services/ui/ws/test_server_window_delegate.h"
17 #include "services/ui/ws/test_utils.h" 16 #include "services/ui/ws/test_utils.h"
18 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
19 18
20 namespace ui { 19 namespace ui {
21 namespace ws { 20 namespace ws {
22 namespace test { 21 namespace test {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 frame_generator_->DrawWindowTree( 66 frame_generator_->DrawWindowTree(
68 pass, frame_generator_delegate_->GetRootWindow(), gfx::Vector2d(), 1.0f); 67 pass, frame_generator_delegate_->GetRootWindow(), gfx::Vector2d(), 1.0f);
69 } 68 }
70 69
71 void FrameGeneratorTest::SetUp() { 70 void FrameGeneratorTest::SetUp() {
72 testing::Test::SetUp(); 71 testing::Test::SetUp();
73 frame_generator_delegate_.reset(new TestFrameGeneratorDelegate( 72 frame_generator_delegate_.reset(new TestFrameGeneratorDelegate(
74 base::WrapUnique(new ServerWindow(&window_delegate_, WindowId())))); 73 base::WrapUnique(new ServerWindow(&window_delegate_, WindowId()))));
75 PlatformDisplayInitParams init_params; 74 PlatformDisplayInitParams init_params;
76 frame_generator_.reset(new FrameGenerator(frame_generator_delegate_.get(), 75 frame_generator_.reset(new FrameGenerator(frame_generator_delegate_.get(),
77 init_params.gpu_state,
78 init_params.surfaces_state)); 76 init_params.surfaces_state));
79 InitWindow(root_window()); 77 InitWindow(root_window());
80 } 78 }
81 79
82 void FrameGeneratorTest::TearDown() { 80 void FrameGeneratorTest::TearDown() {
83 frame_generator_.reset(); 81 frame_generator_.reset();
84 frame_generator_delegate_.reset(); 82 frame_generator_delegate_.reset();
85 } 83 }
86 84
87 // Tests correctness of the SharedQuadStateList generated by 85 // Tests correctness of the SharedQuadStateList generated by
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 EXPECT_EQ(3u, quad_state_list->size()); 120 EXPECT_EQ(3u, quad_state_list->size());
123 auto it = quad_state_list->begin(); 121 auto it = quad_state_list->begin();
124 EXPECT_EQ(child_opacity * root_opacity, (*it)->opacity); 122 EXPECT_EQ(child_opacity * root_opacity, (*it)->opacity);
125 EXPECT_EQ(child_opacity * root_opacity, (*++it)->opacity); 123 EXPECT_EQ(child_opacity * root_opacity, (*++it)->opacity);
126 EXPECT_EQ(root_opacity, (*++it)->opacity); 124 EXPECT_EQ(root_opacity, (*++it)->opacity);
127 } 125 }
128 126
129 } // namespace test 127 } // namespace test
130 } // namespace ws 128 } // namespace ws
131 } // namespace ui 129 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator.cc ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698