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.h" | 7 #include "cc/layer_tree_host.h" |
8 | 8 |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/content_layer.h" | 10 #include "cc/content_layer.h" |
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1217 bool drawsContent() const { return true; } | 1217 bool drawsContent() const { return true; } |
1218 MOCK_CONST_METHOD0(preserves3D, bool()); | 1218 MOCK_CONST_METHOD0(preserves3D, bool()); |
1219 void paintContents(SkCanvas*, const gfx::Rect&, gfx::RectF&) OVERRIDE { } | 1219 void paintContents(SkCanvas*, const gfx::Rect&, gfx::RectF&) OVERRIDE { } |
1220 void notifySyncRequired() { } | 1220 void notifySyncRequired() { } |
1221 }; | 1221 }; |
1222 | 1222 |
1223 class NoScaleContentLayer : public ContentLayer { | 1223 class NoScaleContentLayer : public ContentLayer { |
1224 public: | 1224 public: |
1225 static scoped_refptr<NoScaleContentLayer> create(ContentLayerClient* client)
{ return make_scoped_refptr(new NoScaleContentLayer(client)); } | 1225 static scoped_refptr<NoScaleContentLayer> create(ContentLayerClient* client)
{ return make_scoped_refptr(new NoScaleContentLayer(client)); } |
1226 | 1226 |
1227 virtual bool needsContentsScale() const OVERRIDE { return false; } | 1227 virtual IntSize contentBounds() const OVERRIDE { return bounds(); } |
| 1228 virtual float contentsScaleX() const OVERRIDE { return 1.0; } |
| 1229 virtual float contentsScaleY() const OVERRIDE { return 1.0; } |
1228 | 1230 |
1229 private: | 1231 private: |
1230 explicit NoScaleContentLayer(ContentLayerClient* client) | 1232 explicit NoScaleContentLayer(ContentLayerClient* client) |
1231 : ContentLayer(client) { } | 1233 : ContentLayer(client) { } |
1232 virtual ~NoScaleContentLayer() { } | 1234 virtual ~NoScaleContentLayer() { } |
1233 }; | 1235 }; |
1234 | 1236 |
1235 // Ensures that when opacity is being animated, this value does not cause the su
btree to be skipped. | 1237 // Ensures that when opacity is being animated, this value does not cause the su
btree to be skipped. |
1236 class LayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity : public LayerTreeHost
Test { | 1238 class LayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity : public LayerTreeHost
Test { |
1237 public: | 1239 public: |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3262 int m_numCommitsDeferred; | 3264 int m_numCommitsDeferred; |
3263 int m_numCompleteCommits; | 3265 int m_numCompleteCommits; |
3264 }; | 3266 }; |
3265 | 3267 |
3266 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread) | 3268 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread) |
3267 { | 3269 { |
3268 runTest(true); | 3270 runTest(true); |
3269 } | 3271 } |
3270 | 3272 |
3271 } // namespace | 3273 } // namespace |
OLD | NEW |