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

Side by Side Diff: ui/android/resources/resource_manager_impl_unittest.cc

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed vmpstr's comments. Created 4 years, 10 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/trees/threaded_channel.cc ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "cc/resources/ui_resource_bitmap.h" 8 #include "cc/resources/ui_resource_bitmap.h"
9 #include "cc/test/fake_layer_tree_host_client.h" 9 #include "cc/test/fake_layer_tree_host_client.h"
10 #include "cc/test/test_task_graph_runner.h" 10 #include "cc/test/test_task_graph_runner.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 ResourceManagerTest() 90 ResourceManagerTest()
91 : window_android_(WindowAndroid::createForTesting()), 91 : window_android_(WindowAndroid::createForTesting()),
92 resource_manager_(window_android_), 92 resource_manager_(window_android_),
93 fake_client_(cc::FakeLayerTreeHostClient::DIRECT_3D) { 93 fake_client_(cc::FakeLayerTreeHostClient::DIRECT_3D) {
94 cc::LayerTreeHost::InitParams params; 94 cc::LayerTreeHost::InitParams params;
95 cc::LayerTreeSettings settings; 95 cc::LayerTreeSettings settings;
96 params.client = &fake_client_; 96 params.client = &fake_client_;
97 params.settings = &settings; 97 params.settings = &settings;
98 params.task_graph_runner = &task_graph_runner_; 98 params.task_graph_runner = &task_graph_runner_;
99 host_.reset(new MockLayerTreeHost(&params, 99 host_.reset(new MockLayerTreeHost(&params,
100 cc::CompositorMode::SingleThreaded)); 100 cc::CompositorMode::SINGLE_THREADED));
101 resource_manager_.Init(host_.get()); 101 resource_manager_.Init(host_.get());
102 } 102 }
103 103
104 ~ResourceManagerTest() override { window_android_->Destroy(NULL, NULL); } 104 ~ResourceManagerTest() override { window_android_->Destroy(NULL, NULL); }
105 105
106 void PreloadResource(ui::SystemUIResourceType type) { 106 void PreloadResource(ui::SystemUIResourceType type) {
107 resource_manager_.PreloadResource(ui::ANDROID_RESOURCE_TYPE_SYSTEM, type); 107 resource_manager_.PreloadResource(ui::ANDROID_RESOURCE_TYPE_SYSTEM, type);
108 } 108 }
109 109
110 cc::UIResourceId GetUIResourceId(ui::SystemUIResourceType type) { 110 cc::UIResourceId GetUIResourceId(ui::SystemUIResourceType type) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 EXPECT_EQ(kNumFrames, actual_rects.size()); 178 EXPECT_EQ(kNumFrames, actual_rects.size());
179 for (size_t i = 0; i < kNumFrames; i++) { 179 for (size_t i = 0; i < kNumFrames; i++) {
180 EXPECT_EQ(expected_rects[i].size(), actual_rects[i].size()); 180 EXPECT_EQ(expected_rects[i].size(), actual_rects[i].size());
181 for (size_t j = 0; j < actual_rects[i].size(); j++) { 181 for (size_t j = 0; j < actual_rects[i].size(); j++) {
182 EXPECT_EQ(expected_rects[i][j], actual_rects[i][j]); 182 EXPECT_EQ(expected_rects[i][j], actual_rects[i][j]);
183 } 183 }
184 } 184 }
185 } 185 }
186 186
187 } // namespace ui 187 } // namespace ui
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698