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/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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |