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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 1411663002: cc: Split Proxy to eliminate unnecessary dependencies on the impl side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update perf tests. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 6883986c7d08f65ccd910f173963a3dbd8a5f480..9d5792d0f7435738d887f5896139538589c8a43c 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -21,7 +21,7 @@
#include "cc/output/copy_output_result.h"
#include "cc/test/animation_test_common.h"
#include "cc/test/fake_content_layer_client.h"
-#include "cc/test/fake_impl_proxy.h"
+#include "cc/test/fake_impl_task_runner_provider.h"
#include "cc/test/fake_layer_tree_host.h"
#include "cc/test/fake_layer_tree_host_impl.h"
#include "cc/test/fake_output_surface.h"
@@ -32,8 +32,8 @@
#include "cc/test/test_task_graph_runner.h"
#include "cc/trees/draw_property_utils.h"
#include "cc/trees/layer_tree_impl.h"
-#include "cc/trees/proxy.h"
#include "cc/trees/single_thread_proxy.h"
+#include "cc/trees/task_runner_provider.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/quad_f.h"
@@ -277,10 +277,10 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
const float kPageScale = 0.888f;
const float kDeviceScale = 1.666f;
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
gfx::Transform identity_matrix;
@@ -3213,11 +3213,11 @@ TEST_F(LayerTreeHostCommonTest,
TEST_F(LayerTreeHostCommonTest,
OcclusionForLayerWithUninvertibleDrawTransform) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.active_tree(), 1);
scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.active_tree(), 2);
@@ -4837,10 +4837,10 @@ TEST_F(LayerTreeHostCommonTest, TransparentChildRenderSurfaceCreation) {
}
TEST_F(LayerTreeHostCommonTest, OpacityAnimatingOnPendingTree) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
@@ -4883,7 +4883,9 @@ class LCDTextTest : public LayerTreeHostCommonTestBase,
public:
LCDTextTest()
: LayerTreeHostCommonTestBase(LayerTreeSettings()),
- host_impl_(&proxy_, &shared_bitmap_manager_, &task_graph_runner_),
+ host_impl_(&task_runner_provider_,
+ &shared_bitmap_manager_,
+ &task_graph_runner_),
root_(nullptr),
child_(nullptr),
grand_child_(nullptr) {}
@@ -4932,7 +4934,7 @@ class LCDTextTest : public LayerTreeHostCommonTestBase,
bool can_use_lcd_text_;
bool layers_always_allowed_lcd_text_;
- FakeImplProxy proxy_;
+ FakeImplTaskRunnerProvider task_runner_provider_;
TestSharedBitmapManager shared_bitmap_manager_;
TestTaskGraphRunner task_graph_runner_;
FakeLayerTreeHostImpl host_impl_;
@@ -5102,10 +5104,10 @@ INSTANTIATE_TEST_CASE_P(LayerTreeHostCommonTest,
testing::Bool()));
TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
const gfx::Transform identity_matrix;
@@ -5149,10 +5151,10 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) {
}
TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayersImpl) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
const gfx::Transform identity_matrix;
@@ -5196,10 +5198,10 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayersImpl) {
void EmptyCopyOutputCallback(scoped_ptr<CopyOutputResult> result) {}
TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
const gfx::Transform identity_matrix;
@@ -5329,10 +5331,10 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
}
TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
const gfx::Transform identity_matrix;
@@ -5392,10 +5394,10 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
}
TEST_F(LayerTreeHostCommonTest, VisibleContentRectInsideSurface) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
const gfx::Transform identity_matrix;
@@ -5844,10 +5846,10 @@ TEST_F(LayerTreeHostCommonTest,
}
TEST_F(LayerTreeHostCommonTest, CanRenderToSeparateSurface) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
scoped_ptr<LayerImpl> root =
LayerImpl::Create(host_impl.active_tree(), 12345);
@@ -6404,10 +6406,10 @@ TEST_F(LayerTreeHostCommonTest, ScrollCompensationWithRounding) {
// + scroller
// + fixed
//
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.active_tree(), 1);
@@ -6550,10 +6552,10 @@ TEST_F(LayerTreeHostCommonTest,
// + scroller
// + fixed
//
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
host_impl.CreatePendingTree();
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.active_tree(), 1);
@@ -6703,13 +6705,13 @@ class AnimationScaleFactorTrackingLayerImpl : public LayerImpl {
};
TEST_F(LayerTreeHostCommonTest, MaximumAnimationScaleFactor) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
LayerTreeSettings settings;
settings.layer_transforms_should_scale_layer_contents = true;
- FakeLayerTreeHostImpl host_impl(settings, &proxy, &shared_bitmap_manager,
- &task_graph_runner);
+ FakeLayerTreeHostImpl host_impl(settings, &task_runner_provider,
+ &shared_bitmap_manager, &task_graph_runner);
gfx::Transform identity_matrix;
scoped_ptr<AnimationScaleFactorTrackingLayerImpl> grand_parent =
AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 1);
@@ -7031,10 +7033,10 @@ static void GatherDrawnLayers(LayerImplList* rsll,
}
TEST_F(LayerTreeHostCommonTest, RenderSurfaceLayerListMembership) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
gfx::Transform identity_matrix;
@@ -7281,13 +7283,13 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceLayerListMembership) {
}
TEST_F(LayerTreeHostCommonTest, DrawPropertyScales) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
LayerTreeSettings settings;
settings.layer_transforms_should_scale_layer_contents = true;
- FakeLayerTreeHostImpl host_impl(settings, &proxy, &shared_bitmap_manager,
- &task_graph_runner);
+ FakeLayerTreeHostImpl host_impl(settings, &task_runner_provider,
+ &shared_bitmap_manager, &task_graph_runner);
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.active_tree(), 1);
LayerImpl* root_layer = root.get();
@@ -7486,10 +7488,10 @@ TEST_F(LayerTreeHostCommonTest, VisibleContentRectInChildRenderSurface) {
}
TEST_F(LayerTreeHostCommonTest, BoundsDeltaAffectVisibleContentRect) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
// Set two layers: the root layer clips it's child,
@@ -8255,10 +8257,10 @@ TEST_F(LayerTreeHostCommonTest, SkippingSubtreeMain) {
}
TEST_F(LayerTreeHostCommonTest, SkippingSubtreeImpl) {
- FakeImplProxy proxy;
+ FakeImplTaskRunnerProvider task_runner_provider;
TestSharedBitmapManager shared_bitmap_manager;
TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
+ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
gfx::Transform identity;
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698