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/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/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 output_surface->InitializeBeginFrameEmulation( | 1642 output_surface->InitializeBeginFrameEmulation( |
1643 proxy_->ImplThreadTaskRunner(), | 1643 proxy_->ImplThreadTaskRunner(), |
1644 settings_.throttle_frame_production, | 1644 settings_.throttle_frame_production, |
1645 display_refresh_interval); | 1645 display_refresh_interval); |
1646 } | 1646 } |
1647 | 1647 |
1648 int max_frames_pending = | 1648 int max_frames_pending = |
1649 output_surface->capabilities().max_frames_pending; | 1649 output_surface->capabilities().max_frames_pending; |
1650 if (max_frames_pending <= 0) | 1650 if (max_frames_pending <= 0) |
1651 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; | 1651 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; |
| 1652 max_frames_pending = 2; |
1652 output_surface->SetMaxFramesPending(max_frames_pending); | 1653 output_surface->SetMaxFramesPending(max_frames_pending); |
1653 | 1654 |
1654 resource_provider_ = resource_provider.Pass(); | 1655 resource_provider_ = resource_provider.Pass(); |
1655 output_surface_ = output_surface.Pass(); | 1656 output_surface_ = output_surface.Pass(); |
1656 output_surface_lost_ = false; | 1657 output_surface_lost_ = false; |
1657 | 1658 |
1658 client_->OnCanDrawStateChanged(CanDraw()); | 1659 client_->OnCanDrawStateChanged(CanDraw()); |
1659 | 1660 |
1660 // See note in LayerTreeImpl::UpdateDrawProperties. Renderer needs | 1661 // See note in LayerTreeImpl::UpdateDrawProperties. Renderer needs |
1661 // to be initialized to get max texture size. | 1662 // to be initialized to get max texture size. |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 | 2504 |
2504 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( | 2505 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( |
2505 UIResourceId uid) const { | 2506 UIResourceId uid) const { |
2506 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); | 2507 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); |
2507 if (iter != ui_resource_map_.end()) | 2508 if (iter != ui_resource_map_.end()) |
2508 return iter->second; | 2509 return iter->second; |
2509 return 0; | 2510 return 0; |
2510 } | 2511 } |
2511 | 2512 |
2512 } // namespace cc | 2513 } // namespace cc |
OLD | NEW |