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

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

Issue 22354007: cc: Add queue of BeginFrames to support long deadlines. (Closed) Base URL: http://git.chromium.org/chromium/src.git@deferredCommit
Patch Set: Created 7 years, 4 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
« cc/output/output_surface.cc ('K') | « cc/scheduler/scheduler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« cc/output/output_surface.cc ('K') | « cc/scheduler/scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698