| OLD | NEW |
| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/layer_tree_host_common.h" | 7 #include "cc/layer_tree_host_common.h" |
| 8 | 8 |
| 9 #include "cc/content_layer.h" | 9 #include "cc/content_layer.h" |
| 10 #include "cc/content_layer_client.h" | 10 #include "cc/content_layer_client.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 private: | 125 private: |
| 126 virtual ~LayerWithForcedDrawsContent() | 126 virtual ~LayerWithForcedDrawsContent() |
| 127 { | 127 { |
| 128 } | 128 } |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 class MockContentLayerClient : public ContentLayerClient { | 131 class MockContentLayerClient : public ContentLayerClient { |
| 132 public: | 132 public: |
| 133 MockContentLayerClient() { } | 133 MockContentLayerClient() { } |
| 134 virtual ~MockContentLayerClient() { } | 134 virtual ~MockContentLayerClient() { } |
| 135 virtual void paintContents(SkCanvas*, const IntRect& clip, FloatRect& opaque
) OVERRIDE { } | 135 virtual void paintContents(SkCanvas*, const gfx::Rect& clip, gfx::RectF& opa
que) OVERRIDE { } |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 scoped_refptr<ContentLayer> createDrawableContentLayer(ContentLayerClient* deleg
ate) | 138 scoped_refptr<ContentLayer> createDrawableContentLayer(ContentLayerClient* deleg
ate) |
| 139 { | 139 { |
| 140 scoped_refptr<ContentLayer> toReturn = ContentLayer::create(delegate); | 140 scoped_refptr<ContentLayer> toReturn = ContentLayer::create(delegate); |
| 141 toReturn->setIsDrawable(true); | 141 toReturn->setIsDrawable(true); |
| 142 return toReturn; | 142 return toReturn; |
| 143 } | 143 } |
| 144 | 144 |
| 145 TEST(LayerTreeHostCommonTest, verifyTransformsForNoOpLayer) | 145 TEST(LayerTreeHostCommonTest, verifyTransformsForNoOpLayer) |
| (...skipping 3742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3888 int nonexistentId = -1; | 3888 int nonexistentId = -1; |
| 3889 EXPECT_EQ(root, LayerTreeHostCommon::findLayerInSubtree(root.get(), root->id
())); | 3889 EXPECT_EQ(root, LayerTreeHostCommon::findLayerInSubtree(root.get(), root->id
())); |
| 3890 EXPECT_EQ(child, LayerTreeHostCommon::findLayerInSubtree(root.get(), child->
id())); | 3890 EXPECT_EQ(child, LayerTreeHostCommon::findLayerInSubtree(root.get(), child->
id())); |
| 3891 EXPECT_EQ(grandChild, LayerTreeHostCommon::findLayerInSubtree(root.get(), gr
andChild->id())); | 3891 EXPECT_EQ(grandChild, LayerTreeHostCommon::findLayerInSubtree(root.get(), gr
andChild->id())); |
| 3892 EXPECT_EQ(maskLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(), mas
kLayer->id())); | 3892 EXPECT_EQ(maskLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(), mas
kLayer->id())); |
| 3893 EXPECT_EQ(replicaLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(),
replicaLayer->id())); | 3893 EXPECT_EQ(replicaLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(),
replicaLayer->id())); |
| 3894 EXPECT_EQ(0, LayerTreeHostCommon::findLayerInSubtree(root.get(), nonexistent
Id)); | 3894 EXPECT_EQ(0, LayerTreeHostCommon::findLayerInSubtree(root.get(), nonexistent
Id)); |
| 3895 } | 3895 } |
| 3896 | 3896 |
| 3897 } // namespace | 3897 } // namespace |
| OLD | NEW |