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

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

Issue 12545018: Move context-related callbacks into OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: suppress lost context notification before renderer initialized 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 top_controls_manager_ ? top_controls_manager_->content_top_offset() : 0.f; 1045 top_controls_manager_ ? top_controls_manager_->content_top_offset() : 0.f;
1046 return gfx::SizeF(dip_size.width(), 1046 return gfx::SizeF(dip_size.width(),
1047 dip_size.height() - topOffset - overdraw_bottom_height_); 1047 dip_size.height() - topOffset - overdraw_bottom_height_);
1048 } 1048 }
1049 1049
1050 const LayerTreeSettings& LayerTreeHostImpl::Settings() const { 1050 const LayerTreeSettings& LayerTreeHostImpl::Settings() const {
1051 return settings(); 1051 return settings();
1052 } 1052 }
1053 1053
1054 void LayerTreeHostImpl::DidLoseOutputSurface() { 1054 void LayerTreeHostImpl::DidLoseOutputSurface() {
1055 client_->DidLoseOutputSurfaceOnImplThread(); 1055 if (renderer_)
enne (OOO) 2013/03/25 18:29:19 Why do you need to not send this notification if t
danakj 2013/03/25 18:40:43 The unit tests were built in a world where losing
1056 client_->DidLoseOutputSurfaceOnImplThread();
1056 } 1057 }
1057 1058
1058 void LayerTreeHostImpl::OnSwapBuffersComplete() { 1059 void LayerTreeHostImpl::OnSwapBuffersComplete() {
1059 client_->OnSwapBuffersCompleteOnImplThread(); 1060 client_->OnSwapBuffersCompleteOnImplThread();
1060 } 1061 }
1061 1062
1062 void LayerTreeHostImpl::Readback(void* pixels, 1063 void LayerTreeHostImpl::Readback(void* pixels,
1063 gfx::Rect rect_in_device_viewport) { 1064 gfx::Rect rect_in_device_viewport) {
1064 DCHECK(renderer_); 1065 DCHECK(renderer_);
1065 renderer_->GetFramebufferPixels(pixels, rect_in_device_viewport); 1066 renderer_->GetFramebufferPixels(pixels, rect_in_device_viewport);
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 debug_state_ = debug_state; 2023 debug_state_ = debug_state;
2023 } 2024 }
2024 2025
2025 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time, 2026 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time,
2026 int commit_number) { 2027 int commit_number) {
2027 DCHECK(debug_state_.continuous_painting); 2028 DCHECK(debug_state_.continuous_painting);
2028 paint_time_counter_->SavePaintTime(total_paint_time, commit_number); 2029 paint_time_counter_->SavePaintTime(total_paint_time, commit_number);
2029 } 2030 }
2030 2031
2031 } // namespace cc 2032 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698