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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 PrioritizedResourceManager* contents_texture_manager = | 318 PrioritizedResourceManager* contents_texture_manager = |
319 layer_tree_host_->contents_texture_manager(); | 319 layer_tree_host_->contents_texture_manager(); |
320 layer_tree_host_impl_->SendManagedMemoryStats( | 320 layer_tree_host_impl_->SendManagedMemoryStats( |
321 contents_texture_manager->MemoryVisibleBytes(), | 321 contents_texture_manager->MemoryVisibleBytes(), |
322 contents_texture_manager->MemoryVisibleAndNearbyBytes(), | 322 contents_texture_manager->MemoryVisibleAndNearbyBytes(), |
323 contents_texture_manager->MemoryUseBytes()); | 323 contents_texture_manager->MemoryUseBytes()); |
324 } | 324 } |
325 | 325 |
326 bool SingleThreadProxy::IsInsideDraw() { return inside_draw_; } | 326 bool SingleThreadProxy::IsInsideDraw() { return inside_draw_; } |
327 | 327 |
| 328 void SingleThreadProxy::DidUpdateCapabilitiesOnImplThread() { |
| 329 { |
| 330 DebugScopedSetImplThread impl(this); |
| 331 renderer_capabilities_for_main_thread_ = |
| 332 layer_tree_host_impl_->GetRendererCapabilities(); |
| 333 } |
| 334 layer_tree_host_->DidUpdateCapabilities(); |
| 335 } |
| 336 |
328 void SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() { | 337 void SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() { |
329 // Cause a commit so we can notice the lost context. | 338 // Cause a commit so we can notice the lost context. |
330 SetNeedsCommitOnImplThread(); | 339 SetNeedsCommitOnImplThread(); |
331 } | 340 } |
332 | 341 |
333 // Called by the legacy scheduling path (e.g. where render_widget does the | 342 // Called by the legacy scheduling path (e.g. where render_widget does the |
334 // scheduling) | 343 // scheduling) |
335 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 344 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
336 gfx::Rect device_viewport_damage_rect; | 345 gfx::Rect device_viewport_damage_rect; |
337 | 346 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 487 |
479 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 488 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
480 | 489 |
481 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 490 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
482 // Impl-side painting only. | 491 // Impl-side painting only. |
483 NOTREACHED(); | 492 NOTREACHED(); |
484 return skia::RefPtr<SkPicture>(); | 493 return skia::RefPtr<SkPicture>(); |
485 } | 494 } |
486 | 495 |
487 } // namespace cc | 496 } // namespace cc |
OLD | NEW |