summaryrefslogtreecommitdiff
path: root/chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-05-09 14:22:11 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-05-09 15:11:45 +0000
commit2ddb2d3e14eef3de7dbd0cef553d669b9ac2361c (patch)
treee75f511546c5fd1a173e87c1f9fb11d7ac8d1af3 /chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc
parenta4f3d46271c57e8155ba912df46a05559d14726e (diff)
downloadqtwebengine-chromium-2ddb2d3e14eef3de7dbd0cef553d669b9ac2361c.tar.gz
BASELINE: Update Chromium to 51.0.2704.41
Also adds in all smaller components by reversing logic for exclusion. Change-Id: Ibf90b506e7da088ea2f65dcf23f2b0992c504422 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc')
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc89
1 files changed, 44 insertions, 45 deletions
diff --git a/chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc b/chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc
index 9db64850edf..ab4a4569c6a 100644
--- a/chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc
+++ b/chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc
@@ -25,14 +25,14 @@ class LayerTreeHostCopyRequestTestMultipleRequests
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root = FakePictureLayer::Create(layer_settings(), &client_);
+ root = FakePictureLayer::Create(&client_);
root->SetBounds(gfx::Size(20, 20));
- child = FakePictureLayer::Create(layer_settings(), &client_);
+ child = FakePictureLayer::Create(&client_);
child->SetBounds(gfx::Size(10, 10));
root->AddChild(child);
- grand_child = FakePictureLayer::Create(layer_settings(), &client_);
+ grand_child = FakePictureLayer::Create(&client_);
grand_child->SetBounds(gfx::Size(5, 5));
child->AddChild(grand_child);
@@ -148,39 +148,39 @@ class LayerTreeHostCopyRequestTestMultipleRequests
TEST_F(LayerTreeHostCopyRequestTestMultipleRequests,
GLRenderer_RunSingleThread) {
use_gl_renderer_ = true;
- RunTest(CompositorMode::SingleThreaded, false);
+ RunTest(CompositorMode::SINGLE_THREADED, false);
}
TEST_F(LayerTreeHostCopyRequestTestMultipleRequests,
GLRenderer_RunMultiThread) {
use_gl_renderer_ = true;
- RunTest(CompositorMode::Threaded, false);
+ RunTest(CompositorMode::THREADED, false);
}
TEST_F(LayerTreeHostCopyRequestTestMultipleRequests,
GLRenderer_RunSingleThread_OutOfOrderCallbacks) {
use_gl_renderer_ = true;
out_of_order_callbacks_ = true;
- RunTest(CompositorMode::SingleThreaded, false);
+ RunTest(CompositorMode::SINGLE_THREADED, false);
}
TEST_F(LayerTreeHostCopyRequestTestMultipleRequests,
GLRenderer_RunMultiThread_OutOfOrderCallbacks) {
use_gl_renderer_ = true;
out_of_order_callbacks_ = true;
- RunTest(CompositorMode::Threaded, false);
+ RunTest(CompositorMode::THREADED, false);
}
TEST_F(LayerTreeHostCopyRequestTestMultipleRequests,
SoftwareRenderer_RunSingleThread) {
use_gl_renderer_ = false;
- RunTest(CompositorMode::SingleThreaded, false);
+ RunTest(CompositorMode::SINGLE_THREADED, false);
}
TEST_F(LayerTreeHostCopyRequestTestMultipleRequests,
SoftwareRenderer_RunMultiThread) {
use_gl_renderer_ = false;
- RunTest(CompositorMode::Threaded, false);
+ RunTest(CompositorMode::THREADED, false);
}
// TODO(crbug.com/564832): Remove this test when the workaround it tests is no
@@ -189,10 +189,10 @@ class LayerTreeHostCopyRequestCompletionCausesCommit
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(15, 15));
root_->AddChild(layer_);
@@ -241,14 +241,14 @@ class LayerTreeHostCopyRequestTestLayerDestroyed
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- main_destroyed_ = FakePictureLayer::Create(layer_settings(), &client_);
+ main_destroyed_ = FakePictureLayer::Create(&client_);
main_destroyed_->SetBounds(gfx::Size(15, 15));
root_->AddChild(main_destroyed_);
- impl_destroyed_ = FakePictureLayer::Create(layer_settings(), &client_);
+ impl_destroyed_ = FakePictureLayer::Create(&client_);
impl_destroyed_->SetBounds(gfx::Size(10, 10));
root_->AddChild(impl_destroyed_);
@@ -334,20 +334,20 @@ class LayerTreeHostCopyRequestTestInHiddenSubtree
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- grand_parent_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ grand_parent_layer_ = FakePictureLayer::Create(&client_);
grand_parent_layer_->SetBounds(gfx::Size(15, 15));
root_->AddChild(grand_parent_layer_);
// parent_layer_ owns a render surface.
- parent_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ parent_layer_ = FakePictureLayer::Create(&client_);
parent_layer_->SetBounds(gfx::Size(15, 15));
parent_layer_->SetForceRenderSurface(true);
grand_parent_layer_->AddChild(parent_layer_);
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetBounds(gfx::Size(10, 10));
parent_layer_->AddChild(copy_layer_);
@@ -434,21 +434,21 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- grand_parent_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ grand_parent_layer_ = FakePictureLayer::Create(&client_);
grand_parent_layer_->SetBounds(gfx::Size(15, 15));
grand_parent_layer_->SetHideLayerAndSubtree(true);
root_->AddChild(grand_parent_layer_);
// parent_layer_ owns a render surface.
- parent_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ parent_layer_ = FakePictureLayer::Create(&client_);
parent_layer_->SetBounds(gfx::Size(15, 15));
parent_layer_->SetForceRenderSurface(true);
grand_parent_layer_->AddChild(parent_layer_);
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetBounds(gfx::Size(10, 10));
parent_layer_->AddChild(copy_layer_);
@@ -478,9 +478,9 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
Renderer* renderer = host_impl->renderer();
LayerImpl* root = host_impl->active_tree()->root_layer();
- LayerImpl* grand_parent = root->children()[0].get();
- LayerImpl* parent = grand_parent->children()[0].get();
- LayerImpl* copy_layer = parent->children()[0].get();
+ LayerImpl* grand_parent = root->children()[0];
+ LayerImpl* parent = grand_parent->children()[0];
+ LayerImpl* copy_layer = parent->children()[0];
// |parent| owns a surface, but it was hidden and not part of the copy
// request so it should not allocate any resource.
@@ -519,15 +519,15 @@ class LayerTreeHostCopyRequestTestClippedOut
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- parent_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ parent_layer_ = FakePictureLayer::Create(&client_);
parent_layer_->SetBounds(gfx::Size(15, 15));
parent_layer_->SetMasksToBounds(true);
root_->AddChild(parent_layer_);
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetPosition(gfx::PointF(15.f, 15.f));
copy_layer_->SetBounds(gfx::Size(10, 10));
parent_layer_->AddChild(copy_layer_);
@@ -568,18 +568,18 @@ class LayerTreeHostCopyRequestTestScaledLayer
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = Layer::Create(layer_settings());
+ root_ = Layer::Create();
root_->SetBounds(gfx::Size(20, 20));
gfx::Transform scale;
scale.Scale(2, 2);
- copy_layer_ = Layer::Create(layer_settings());
+ copy_layer_ = Layer::Create();
copy_layer_->SetBounds(gfx::Size(10, 10));
copy_layer_->SetTransform(scale);
root_->AddChild(copy_layer_);
- child_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ child_layer_ = FakePictureLayer::Create(&client_);
child_layer_->SetBounds(gfx::Size(10, 10));
copy_layer_->AddChild(child_layer_);
@@ -621,10 +621,10 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetBounds(gfx::Size(10, 10));
root_->AddChild(copy_layer_);
@@ -717,10 +717,10 @@ class LayerTreeHostCopyRequestTestLostOutputSurface
}
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetBounds(gfx::Size(10, 10));
root_->AddChild(copy_layer_);
@@ -847,10 +847,10 @@ class LayerTreeHostCopyRequestTestCountTextures
void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetBounds(gfx::Size(10, 10));
root_->AddChild(copy_layer_);
@@ -1006,10 +1006,10 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetBounds(gfx::Size(10, 10));
root_->AddChild(copy_layer_);
@@ -1084,10 +1084,10 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- root_ = FakePictureLayer::Create(layer_settings(), &client_);
+ root_ = FakePictureLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
- copy_layer_ = FakePictureLayer::Create(layer_settings(), &client_);
+ copy_layer_ = FakePictureLayer::Create(&client_);
copy_layer_->SetBounds(gfx::Size(10, 10));
root_->AddChild(copy_layer_);
@@ -1156,11 +1156,10 @@ class LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest
: public LayerTreeHostCopyRequestTest {
protected:
void SetupTree() override {
- scoped_refptr<FakePictureLayer> root =
- FakePictureLayer::Create(layer_settings(), &client_);
+ scoped_refptr<FakePictureLayer> root = FakePictureLayer::Create(&client_);
root->SetBounds(gfx::Size(20, 20));
- child_ = FakePictureLayer::Create(layer_settings(), &client_);
+ child_ = FakePictureLayer::Create(&client_);
child_->SetBounds(gfx::Size(10, 10));
root->AddChild(child_);
child_->SetHideLayerAndSubtree(true);
@@ -1192,7 +1191,7 @@ class LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest
LayerTreeHostImpl::FrameData* frame_data,
DrawResult draw_result) override {
LayerImpl* root = host_impl->active_tree()->root_layer();
- LayerImpl* child = root->children()[0].get();
+ LayerImpl* child = root->children()[0];
bool saw_root = false;
bool saw_child = false;