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/thread_proxy.h" | 7 #include "cc/thread_proxy.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 request->success = false; | 110 request->success = false; |
111 request->completion.signal(); | 111 request->completion.signal(); |
112 return; | 112 return; |
113 } | 113 } |
114 | 114 |
115 m_readbackRequestOnImplThread = request; | 115 m_readbackRequestOnImplThread = request; |
116 m_schedulerOnImplThread->setNeedsRedraw(); | 116 m_schedulerOnImplThread->setNeedsRedraw(); |
117 m_schedulerOnImplThread->setNeedsForcedRedraw(); | 117 m_schedulerOnImplThread->setNeedsForcedRedraw(); |
118 } | 118 } |
119 | 119 |
120 void ThreadProxy::startPageScaleAnimation(const IntSize& targetPosition, bool us
eAnchor, float scale, base::TimeDelta duration) | 120 void ThreadProxy::startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAn
chor, float scale, base::TimeDelta duration) |
121 { | 121 { |
122 DCHECK(Proxy::isMainThread()); | 122 DCHECK(Proxy::isMainThread()); |
123 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::requestStartPageScale
AnimationOnImplThread, base::Unretained(this), targetPosition, useAnchor, scale,
duration)); | 123 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::requestStartPageScale
AnimationOnImplThread, base::Unretained(this), targetOffset, useAnchor, scale, d
uration)); |
124 } | 124 } |
125 | 125 |
126 void ThreadProxy::requestStartPageScaleAnimationOnImplThread(IntSize targetPosit
ion, bool useAnchor, float scale, base::TimeDelta duration) | 126 void ThreadProxy::requestStartPageScaleAnimationOnImplThread(gfx::Vector2d targe
tOffset, bool useAnchor, float scale, base::TimeDelta duration) |
127 { | 127 { |
128 DCHECK(Proxy::isImplThread()); | 128 DCHECK(Proxy::isImplThread()); |
129 if (m_layerTreeHostImpl.get()) | 129 if (m_layerTreeHostImpl.get()) |
130 m_layerTreeHostImpl->startPageScaleAnimation(targetPosition, useAnchor,
scale, base::TimeTicks::Now(), duration); | 130 m_layerTreeHostImpl->startPageScaleAnimation(targetOffset, useAnchor, sc
ale, base::TimeTicks::Now(), duration); |
131 } | 131 } |
132 | 132 |
133 void ThreadProxy::finishAllRendering() | 133 void ThreadProxy::finishAllRendering() |
134 { | 134 { |
135 DCHECK(Proxy::isMainThread()); | 135 DCHECK(Proxy::isMainThread()); |
136 DCHECK(!m_deferCommits); | 136 DCHECK(!m_deferCommits); |
137 | 137 |
138 // Make sure all GL drawing is finished on the impl thread. | 138 // Make sure all GL drawing is finished on the impl thread. |
139 DebugScopedSetMainThreadBlocked mainThreadBlocked; | 139 DebugScopedSetMainThreadBlocked mainThreadBlocked; |
140 CompletionEvent completion; | 140 CompletionEvent completion; |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 | 981 |
982 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() | 982 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() |
983 { | 983 { |
984 } | 984 } |
985 | 985 |
986 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() | 986 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() |
987 { | 987 { |
988 } | 988 } |
989 | 989 |
990 } // namespace cc | 990 } // namespace cc |
OLD | NEW |