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

Unified Diff: cc/layers/layer_impl_unittest.cc

Issue 202763002: Switch to use SharedBitmapManager all the time in cc_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/layers/heads_up_display_layer_impl_unittest.cc ('k') | cc/layers/layer_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl_unittest.cc
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index 064b807a31febd465f5ee2842de22c767d658b84..9fb61d02f7541abfc2b00bb912b5c5b80f32e63e 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -10,6 +10,7 @@
#include "cc/test/fake_layer_tree_host_impl.h"
#include "cc/test/fake_output_surface.h"
#include "cc/test/geometry_test_utils.h"
+#include "cc/test/test_shared_bitmap_manager.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -82,7 +83,8 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
// The constructor on this will fake that we are on the correct thread.
// Create a simple LayerImpl tree:
FakeImplProxy proxy;
- FakeLayerTreeHostImpl host_impl(&proxy);
+ TestSharedBitmapManager shared_bitmap_manager;
+ FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager);
EXPECT_TRUE(host_impl.InitializeRenderer(
FakeOutputSurface::Create3d().PassAs<OutputSurface>()));
scoped_ptr<LayerImpl> root_clip =
@@ -241,7 +243,8 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
FakeImplProxy proxy;
- FakeLayerTreeHostImpl host_impl(&proxy);
+ TestSharedBitmapManager shared_bitmap_manager;
+ FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager);
EXPECT_TRUE(host_impl.InitializeRenderer(
FakeOutputSurface::Create3d().PassAs<OutputSurface>()));
host_impl.active_tree()->SetRootLayer(
@@ -353,7 +356,8 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
TEST(LayerImplTest, SafeOpaqueBackgroundColor) {
FakeImplProxy proxy;
- FakeLayerTreeHostImpl host_impl(&proxy);
+ TestSharedBitmapManager shared_bitmap_manager;
+ FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager);
EXPECT_TRUE(host_impl.InitializeRenderer(
FakeOutputSurface::Create3d().PassAs<OutputSurface>()));
scoped_ptr<LayerImpl> layer = LayerImpl::Create(host_impl.active_tree(), 1);
@@ -384,9 +388,10 @@ TEST(LayerImplTest, SafeOpaqueBackgroundColor) {
class LayerImplScrollTest : public testing::Test {
public:
- LayerImplScrollTest() : host_impl_(&proxy_), root_id_(7) {
- host_impl_.active_tree()
- ->SetRootLayer(LayerImpl::Create(host_impl_.active_tree(), root_id_));
+ LayerImplScrollTest()
+ : host_impl_(&proxy_, &shared_bitmap_manager_), root_id_(7) {
+ host_impl_.active_tree()->SetRootLayer(
+ LayerImpl::Create(host_impl_.active_tree(), root_id_));
host_impl_.active_tree()->root_layer()->AddChild(
LayerImpl::Create(host_impl_.active_tree(), root_id_ + 1));
layer()->SetScrollClipLayer(root_id_);
@@ -404,6 +409,7 @@ class LayerImplScrollTest : public testing::Test {
private:
FakeImplProxy proxy_;
+ TestSharedBitmapManager shared_bitmap_manager_;
FakeLayerTreeHostImpl host_impl_;
int root_id_;
};
« no previous file with comments | « cc/layers/heads_up_display_layer_impl_unittest.cc ('k') | cc/layers/layer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698