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

Side by Side Diff: cc/CCThreadedTest.cpp

Issue 10947047: Fix remaining cc files to compile with Clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FakeCCDelayBasedTimeSource Created 8 years, 3 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/CCThreadedTest.h ('k') | cc/ContentLayerChromium.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 "CCThreadedTest.h" 7 #include "CCThreadedTest.h"
8 8
9 #include "CCActiveAnimation.h" 9 #include "CCActiveAnimation.h"
10 #include "CCAnimationTestCommon.h" 10 #include "CCAnimationTestCommon.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void CompositorFakeWebGraphicsContext3DWithTextureTracking::resetTextures() { m_ textures.clear(); } 70 void CompositorFakeWebGraphicsContext3DWithTextureTracking::resetTextures() { m_ textures.clear(); }
71 71
72 int CompositorFakeWebGraphicsContext3DWithTextureTracking::numUsedTextures() con st { return static_cast<int>(m_usedTextures.size()); } 72 int CompositorFakeWebGraphicsContext3DWithTextureTracking::numUsedTextures() con st { return static_cast<int>(m_usedTextures.size()); }
73 bool CompositorFakeWebGraphicsContext3DWithTextureTracking::usedTexture(int text ure) const { return m_usedTextures.find(texture) != m_usedTextures.end(); } 73 bool CompositorFakeWebGraphicsContext3DWithTextureTracking::usedTexture(int text ure) const { return m_usedTextures.find(texture) != m_usedTextures.end(); }
74 void CompositorFakeWebGraphicsContext3DWithTextureTracking::resetUsedTextures() { m_usedTextures.clear(); } 74 void CompositorFakeWebGraphicsContext3DWithTextureTracking::resetUsedTextures() { m_usedTextures.clear(); }
75 75
76 CompositorFakeWebGraphicsContext3DWithTextureTracking::CompositorFakeWebGraphics Context3DWithTextureTracking(Attributes attrs) : CompositorFakeWebGraphicsContex t3D(attrs) 76 CompositorFakeWebGraphicsContext3DWithTextureTracking::CompositorFakeWebGraphics Context3DWithTextureTracking(Attributes attrs) : CompositorFakeWebGraphicsContex t3D(attrs)
77 { 77 {
78 } 78 }
79 79
80 CompositorFakeWebGraphicsContext3DWithTextureTracking::~CompositorFakeWebGraphic sContext3DWithTextureTracking()
81 {
82 }
83
84 bool TestHooks::prepareToDrawOnCCThread(cc::CCLayerTreeHostImpl*)
85 {
86 return true;
87 }
88
80 PassOwnPtr<WebCompositorOutputSurface> TestHooks::createOutputSurface() 89 PassOwnPtr<WebCompositorOutputSurface> TestHooks::createOutputSurface()
81 { 90 {
82 return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsConte xt3DWithTextureTracking::create(WebGraphicsContext3D::Attributes())); 91 return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsConte xt3DWithTextureTracking::create(WebGraphicsContext3D::Attributes()));
83 } 92 }
84 93
85 PassOwnPtr<MockLayerTreeHostImpl> MockLayerTreeHostImpl::create(TestHooks* testH ooks, const CCLayerTreeSettings& settings, CCLayerTreeHostImplClient* client) 94 PassOwnPtr<MockLayerTreeHostImpl> MockLayerTreeHostImpl::create(TestHooks* testH ooks, const CCLayerTreeSettings& settings, CCLayerTreeHostImplClient* client)
86 { 95 {
87 return adoptPtr(new MockLayerTreeHostImpl(testHooks, settings, client)); 96 return adoptPtr(new MockLayerTreeHostImpl(testHooks, settings, client));
88 } 97 }
89 98
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 CCThreadedTest* m_test; 298 CCThreadedTest* m_test;
290 }; 299 };
291 300
292 CCThreadedTest::CCThreadedTest() 301 CCThreadedTest::CCThreadedTest()
293 : m_beginning(false) 302 : m_beginning(false)
294 , m_endWhenBeginReturns(false) 303 , m_endWhenBeginReturns(false)
295 , m_timedOut(false) 304 , m_timedOut(false)
296 , m_finished(false) 305 , m_finished(false)
297 , m_scheduled(false) 306 , m_scheduled(false)
298 , m_started(false) 307 , m_started(false)
299 { } 308 {
309 }
310
311 CCThreadedTest::~CCThreadedTest()
312 {
313 }
300 314
301 void CCThreadedTest::endTest() 315 void CCThreadedTest::endTest()
302 { 316 {
303 m_finished = true; 317 m_finished = true;
304 318
305 // For the case where we endTest during beginTest(), set a flag to indicate that 319 // For the case where we endTest during beginTest(), set a flag to indicate that
306 // the test should end the second beginTest regains control. 320 // the test should end the second beginTest regains control.
307 if (m_beginning) 321 if (m_beginning)
308 m_endWhenBeginReturns = true; 322 m_endWhenBeginReturns = true;
309 else 323 else
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 if (m_timedOut) { 555 if (m_timedOut) {
542 FAIL() << "Test timed out"; 556 FAIL() << "Test timed out";
543 Platform::current()->compositorSupport()->shutdown(); 557 Platform::current()->compositorSupport()->shutdown();
544 return; 558 return;
545 } 559 }
546 afterTest(); 560 afterTest();
547 Platform::current()->compositorSupport()->shutdown(); 561 Platform::current()->compositorSupport()->shutdown();
548 } 562 }
549 563
550 } // namespace WebKitTests 564 } // namespace WebKitTests
OLDNEW
« no previous file with comments | « cc/CCThreadedTest.h ('k') | cc/ContentLayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698