| 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 "CCLayerTreeHost.h" | 7 #include "CCLayerTreeHost.h" |
| 8 | 8 |
| 9 #include "CCGeometryTestUtils.h" | 9 #include "CCGeometryTestUtils.h" |
| 10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
| (...skipping 2383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2394 scoped_refptr<ContentLayerChromiumWithUpdateTracking> m_replicaLayer1; | 2394 scoped_refptr<ContentLayerChromiumWithUpdateTracking> m_replicaLayer1; |
| 2395 scoped_refptr<ContentLayerChromiumWithUpdateTracking> m_surfaceLayer2; | 2395 scoped_refptr<ContentLayerChromiumWithUpdateTracking> m_surfaceLayer2; |
| 2396 scoped_refptr<ContentLayerChromiumWithUpdateTracking> m_replicaLayer2; | 2396 scoped_refptr<ContentLayerChromiumWithUpdateTracking> m_replicaLayer2; |
| 2397 }; | 2397 }; |
| 2398 | 2398 |
| 2399 SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestSurfaceNotAllocatedForLayersOu
tsideMemoryLimit) | 2399 SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestSurfaceNotAllocatedForLayersOu
tsideMemoryLimit) |
| 2400 | 2400 |
| 2401 | 2401 |
| 2402 class EvictionTrackingTexture : public LayerTextureUpdater::Texture { | 2402 class EvictionTrackingTexture : public LayerTextureUpdater::Texture { |
| 2403 public: | 2403 public: |
| 2404 static PassOwnPtr<EvictionTrackingTexture> create(PassOwnPtr<CCPrioritizedTe
xture> texture) { return adoptPtr(new EvictionTrackingTexture(texture)); } | 2404 static PassOwnPtr<EvictionTrackingTexture> create(scoped_ptr<CCPrioritizedTe
xture> texture) { return adoptPtr(new EvictionTrackingTexture(texture.Pass()));
} |
| 2405 virtual ~EvictionTrackingTexture() { } | 2405 virtual ~EvictionTrackingTexture() { } |
| 2406 | 2406 |
| 2407 virtual void updateRect(CCResourceProvider* resourceProvider, const IntRect&
, const IntSize&) OVERRIDE | 2407 virtual void updateRect(CCResourceProvider* resourceProvider, const IntRect&
, const IntSize&) OVERRIDE |
| 2408 { | 2408 { |
| 2409 ASSERT_TRUE(!texture()->haveBackingTexture() || resourceProvider->numRes
ources() > 0); | 2409 ASSERT_TRUE(!texture()->haveBackingTexture() || resourceProvider->numRes
ources() > 0); |
| 2410 texture()->acquireBackingTexture(resourceProvider); | 2410 texture()->acquireBackingTexture(resourceProvider); |
| 2411 m_updated = true; | 2411 m_updated = true; |
| 2412 } | 2412 } |
| 2413 void resetUpdated() { m_updated = false; } | 2413 void resetUpdated() { m_updated = false; } |
| 2414 bool updated() const { return m_updated; } | 2414 bool updated() const { return m_updated; } |
| 2415 | 2415 |
| 2416 private: | 2416 private: |
| 2417 explicit EvictionTrackingTexture(PassOwnPtr<CCPrioritizedTexture> texture) | 2417 explicit EvictionTrackingTexture(scoped_ptr<CCPrioritizedTexture> texture) |
| 2418 : LayerTextureUpdater::Texture(texture) | 2418 : LayerTextureUpdater::Texture(texture.Pass()) |
| 2419 , m_updated(false) | 2419 , m_updated(false) |
| 2420 { } | 2420 { } |
| 2421 bool m_updated; | 2421 bool m_updated; |
| 2422 }; | 2422 }; |
| 2423 | 2423 |
| 2424 class EvictionTestLayer : public LayerChromium { | 2424 class EvictionTestLayer : public LayerChromium { |
| 2425 public: | 2425 public: |
| 2426 static scoped_refptr<EvictionTestLayer> create() { return make_scoped_refptr
(new EvictionTestLayer()); } | 2426 static scoped_refptr<EvictionTestLayer> create() { return make_scoped_refptr
(new EvictionTestLayer()); } |
| 2427 | 2427 |
| 2428 virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRend
eringStats&) OVERRIDE; | 2428 virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRend
eringStats&) OVERRIDE; |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 int m_numCommitComplete; | 2994 int m_numCommitComplete; |
| 2995 int m_numDrawLayers; | 2995 int m_numDrawLayers; |
| 2996 }; | 2996 }; |
| 2997 | 2997 |
| 2998 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread) | 2998 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread) |
| 2999 { | 2999 { |
| 3000 runTest(true); | 3000 runTest(true); |
| 3001 } | 3001 } |
| 3002 | 3002 |
| 3003 } // namespace | 3003 } // namespace |
| OLD | NEW |