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

Side by Side Diff: cc/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: works 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/layer_tree_host_impl.h" 5 #include "cc/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 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 renderer_ = SoftwareRenderer::Create(this, 1238 renderer_ = SoftwareRenderer::Create(this,
1239 output_surface.get(), 1239 output_surface.get(),
1240 resource_provider.get()); 1240 resource_provider.get());
1241 } 1241 }
1242 if (!renderer_) 1242 if (!renderer_)
1243 return false; 1243 return false;
1244 1244
1245 resource_provider_ = resource_provider.Pass(); 1245 resource_provider_ = resource_provider.Pass();
1246 output_surface_ = output_surface.Pass(); 1246 output_surface_ = output_surface.Pass();
1247 1247
1248 output_surface_->RegisterCallbacks();
piman 2013/03/15 03:20:38 It's rather unfortunate that we have this very com
1249
1248 if (!visible_) 1250 if (!visible_)
1249 renderer_->SetVisible(visible_); 1251 renderer_->SetVisible(visible_);
1250 1252
1251 client_->OnCanDrawStateChanged(CanDraw()); 1253 client_->OnCanDrawStateChanged(CanDraw());
1252 1254
1253 // See note in LayerTreeImpl::UpdateDrawProperties. Renderer needs 1255 // See note in LayerTreeImpl::UpdateDrawProperties. Renderer needs
1254 // to be initialized to get max texture size. 1256 // to be initialized to get max texture size.
1255 active_tree_->set_needs_update_draw_properties(); 1257 active_tree_->set_needs_update_draw_properties();
1256 if (pending_tree_) 1258 if (pending_tree_)
1257 pending_tree_->set_needs_update_draw_properties(); 1259 pending_tree_->set_needs_update_draw_properties();
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 tile_manager_->SetRecordRenderingStats(debug_state_.recordRenderingStats()); 1924 tile_manager_->SetRecordRenderingStats(debug_state_.recordRenderingStats());
1923 } 1925 }
1924 1926
1925 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time, 1927 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time,
1926 int commit_number) { 1928 int commit_number) {
1927 DCHECK(debug_state_.continuousPainting); 1929 DCHECK(debug_state_.continuousPainting);
1928 paint_time_counter_->SavePaintTime(total_paint_time, commit_number); 1930 paint_time_counter_->SavePaintTime(total_paint_time, commit_number);
1929 } 1931 }
1930 1932
1931 } // namespace cc 1933 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698