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 "cc/trees/single_thread_proxy.h" | 5 #include "cc/trees/single_thread_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "cc/base/thread.h" | 9 #include "cc/base/thread.h" |
10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 221 } |
222 layer_tree_host_->CommitComplete(); | 222 layer_tree_host_->CommitComplete(); |
223 next_frame_is_newly_committed_frame_ = true; | 223 next_frame_is_newly_committed_frame_ = true; |
224 } | 224 } |
225 | 225 |
226 void SingleThreadProxy::SetNeedsCommit() { | 226 void SingleThreadProxy::SetNeedsCommit() { |
227 DCHECK(Proxy::IsMainThread()); | 227 DCHECK(Proxy::IsMainThread()); |
228 layer_tree_host_->ScheduleComposite(); | 228 layer_tree_host_->ScheduleComposite(); |
229 } | 229 } |
230 | 230 |
231 void SingleThreadProxy::SetNeedsRedraw(const gfx::Rect& damage_rect) { | 231 void SingleThreadProxy::SetNeedsRedraw(gfx::Rect damage_rect) { |
232 // FIXME: Once we move render_widget scheduling into this class, we can | 232 // FIXME: Once we move render_widget scheduling into this class, we can |
233 // treat redraw requests more efficiently than CommitAndRedraw requests. | 233 // treat redraw requests more efficiently than CommitAndRedraw requests. |
234 layer_tree_host_impl_->SetViewportDamage(damage_rect); | 234 layer_tree_host_impl_->SetViewportDamage(damage_rect); |
235 SetNeedsCommit(); | 235 SetNeedsCommit(); |
236 } | 236 } |
237 | 237 |
238 void SingleThreadProxy::OnHasPendingTreeStateChanged(bool have_pending_tree) { | 238 void SingleThreadProxy::OnHasPendingTreeStateChanged(bool have_pending_tree) { |
239 // Thread-only feature. | 239 // Thread-only feature. |
240 NOTREACHED(); | 240 NOTREACHED(); |
241 } | 241 } |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 | 469 |
470 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 470 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
471 | 471 |
472 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 472 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
473 // Impl-side painting only. | 473 // Impl-side painting only. |
474 NOTREACHED(); | 474 NOTREACHED(); |
475 return skia::RefPtr<SkPicture>(); | 475 return skia::RefPtr<SkPicture>(); |
476 } | 476 } |
477 | 477 |
478 } // namespace cc | 478 } // namespace cc |
OLD | NEW |