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

Side by Side Diff: cc/CCLayerTreeHostTest.cpp

Issue 11035071: [cc] Remove all WTF #includes from CCLayerTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCLayerTreeHostImplTest.cpp ('k') | cc/CCPrioritizedTexture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostImplTest.cpp ('k') | cc/CCPrioritizedTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698