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

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: Added another test to make sure the tilings are cleared correctly 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 4184 matching lines...) Expand 10 before | Expand all | Expand 10 after
4195 scoped_refptr<TestContextProvider> context_provider = 4195 scoped_refptr<TestContextProvider> context_provider =
4196 TestContextProvider::Create(); 4196 TestContextProvider::Create();
4197 context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024); 4197 context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024);
4198 if (delegating_renderer()) 4198 if (delegating_renderer())
4199 return FakeOutputSurface::CreateDelegating3d(context_provider); 4199 return FakeOutputSurface::CreateDelegating3d(context_provider);
4200 else 4200 else
4201 return FakeOutputSurface::Create3d(context_provider); 4201 return FakeOutputSurface::Create3d(context_provider);
4202 } 4202 }
4203 4203
4204 virtual void SetupTree() OVERRIDE { 4204 virtual void SetupTree() OVERRIDE {
4205 client_.set_fill_with_nonsolid_color(true);
danakj 2014/09/19 20:44:28 +sohan FYI you might have to do this for some test
4205 scoped_refptr<FakePictureLayer> root_layer = 4206 scoped_refptr<FakePictureLayer> root_layer =
4206 FakePictureLayer::Create(&client_); 4207 FakePictureLayer::Create(&client_);
4207 root_layer->SetBounds(gfx::Size(6000, 6000)); 4208 root_layer->SetBounds(gfx::Size(6000, 6000));
4208 root_layer->SetIsDrawable(true); 4209 root_layer->SetIsDrawable(true);
4209 4210
4210 layer_tree_host()->SetRootLayer(root_layer); 4211 layer_tree_host()->SetRootLayer(root_layer);
4211 LayerTreeHostTest::SetupTree(); 4212 LayerTreeHostTest::SetupTree();
4212 } 4213 }
4213 4214
4214 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } 4215 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
5034 const gfx::Size bounds_; 5035 const gfx::Size bounds_;
5035 FakeContentLayerClient client_; 5036 FakeContentLayerClient client_;
5036 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; 5037 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_;
5037 scoped_refptr<FakePictureLayer> picture_layer_; 5038 scoped_refptr<FakePictureLayer> picture_layer_;
5038 Layer* child_layer_; 5039 Layer* child_layer_;
5039 }; 5040 };
5040 5041
5041 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); 5042 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting);
5042 5043
5043 } // namespace cc 5044 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698