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

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

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dedup and refactor code Created 7 years, 7 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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698