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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 12674030: cc: Hook vsync time source to output surface (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 years, 9 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
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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 m_hostImpl->SetViewportSize(gfx::Size(10, 10), gfx::Size(10, 10)); 84 m_hostImpl->SetViewportSize(gfx::Size(10, 10), gfx::Size(10, 10));
85 } 85 }
86 86
87 virtual void TearDown() 87 virtual void TearDown()
88 { 88 {
89 } 89 }
90 90
91 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE { } 91 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE { }
92 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE { } 92 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE { }
93 virtual void OnVSyncParametersChanged(base::TimeTicks, base::TimeDelta) OVER RIDE { } 93 virtual void OnVSyncParametersChanged(base::TimeTicks, base::TimeDelta) OVER RIDE { }
94 virtual void DidVSync(base::TimeTicks) OVERRIDE { }
94 virtual void OnCanDrawStateChanged(bool canDraw) OVERRIDE { m_onCanDrawState ChangedCalled = true; } 95 virtual void OnCanDrawStateChanged(bool canDraw) OVERRIDE { m_onCanDrawState ChangedCalled = true; }
95 virtual void OnHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE { m_ hasPendingTree = hasPendingTree; } 96 virtual void OnHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE { m_ hasPendingTree = hasPendingTree; }
96 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { m_didRequestRedraw = tr ue; } 97 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { m_didRequestRedraw = tr ue; }
97 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE { m_didUploadVi sibleTile = true; } 98 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE { m_didUploadVi sibleTile = true; }
98 virtual void SetNeedsCommitOnImplThread() OVERRIDE { m_didRequestCommit = tr ue; } 99 virtual void SetNeedsCommitOnImplThread() OVERRIDE { m_didRequestCommit = tr ue; }
99 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE { } 100 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE { }
100 virtual void PostAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) OVERRIDE { } 101 virtual void PostAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) OVERRIDE { }
101 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) OVERRIDE { return m_reduceMemoryResult; } 102 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) OVERRIDE { return m_reduceMemoryResult; }
102 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE { } 103 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE { }
103 virtual void SendManagedMemoryStats() OVERRIDE { } 104 virtual void SendManagedMemoryStats() OVERRIDE { }
(...skipping 4240 matching lines...) Expand 10 before | Expand all | Expand 10 after
4344 EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), renderPassQuad->rect.ToS tring()); 4345 EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), renderPassQuad->rect.ToS tring());
4345 EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), renderPassQuad->mas k_uv_rect.ToString()); 4346 EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), renderPassQuad->mas k_uv_rect.ToString());
4346 4347
4347 m_hostImpl->DrawLayers(&frame, base::TimeTicks::Now()); 4348 m_hostImpl->DrawLayers(&frame, base::TimeTicks::Now());
4348 m_hostImpl->DidDrawAllLayers(frame); 4349 m_hostImpl->DidDrawAllLayers(frame);
4349 } 4350 }
4350 } 4351 }
4351 4352
4352 } // namespace 4353 } // namespace
4353 } // namespace cc 4354 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698