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

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 519583003: Use the solid color detection to create solid layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final merge Created 6 years, 3 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after
4192 scoped_refptr<TestContextProvider> context_provider = 4192 scoped_refptr<TestContextProvider> context_provider =
4193 TestContextProvider::Create(); 4193 TestContextProvider::Create();
4194 context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024); 4194 context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024);
4195 if (delegating_renderer()) 4195 if (delegating_renderer())
4196 return FakeOutputSurface::CreateDelegating3d(context_provider); 4196 return FakeOutputSurface::CreateDelegating3d(context_provider);
4197 else 4197 else
4198 return FakeOutputSurface::Create3d(context_provider); 4198 return FakeOutputSurface::Create3d(context_provider);
4199 } 4199 }
4200 4200
4201 virtual void SetupTree() OVERRIDE { 4201 virtual void SetupTree() OVERRIDE {
4202 client_.set_fill_with_nonsolid_color(true);
4202 scoped_refptr<FakePictureLayer> root_layer = 4203 scoped_refptr<FakePictureLayer> root_layer =
4203 FakePictureLayer::Create(&client_); 4204 FakePictureLayer::Create(&client_);
4204 root_layer->SetBounds(gfx::Size(6000, 6000)); 4205 root_layer->SetBounds(gfx::Size(6000, 6000));
4205 root_layer->SetIsDrawable(true); 4206 root_layer->SetIsDrawable(true);
4206 4207
4207 layer_tree_host()->SetRootLayer(root_layer); 4208 layer_tree_host()->SetRootLayer(root_layer);
4208 LayerTreeHostTest::SetupTree(); 4209 LayerTreeHostTest::SetupTree();
4209 } 4210 }
4210 4211
4211 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } 4212 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
5016 const gfx::Size bounds_; 5017 const gfx::Size bounds_;
5017 FakeContentLayerClient client_; 5018 FakeContentLayerClient client_;
5018 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; 5019 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_;
5019 scoped_refptr<FakePictureLayer> picture_layer_; 5020 scoped_refptr<FakePictureLayer> picture_layer_;
5020 Layer* child_layer_; 5021 Layer* child_layer_;
5021 }; 5022 };
5022 5023
5023 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); 5024 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting);
5024 5025
5025 } // namespace cc 5026 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_readback.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698