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

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

Issue 49163004: cc: Reduce command buffer flushes related to creating texture ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | 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 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 resource_provider_.reset(); 1665 resource_provider_.reset();
1666 output_surface_.reset(); 1666 output_surface_.reset();
1667 1667
1668 if (!output_surface->BindToClient(this)) 1668 if (!output_surface->BindToClient(this))
1669 return false; 1669 return false;
1670 1670
1671 scoped_ptr<ResourceProvider> resource_provider = 1671 scoped_ptr<ResourceProvider> resource_provider =
1672 ResourceProvider::Create(output_surface.get(), 1672 ResourceProvider::Create(output_surface.get(),
1673 shared_bitmap_manager_, 1673 shared_bitmap_manager_,
1674 settings_.highp_threshold_min, 1674 settings_.highp_threshold_min,
1675 settings_.use_rgba_4444_textures); 1675 settings_.use_rgba_4444_textures,
1676 settings_.texture_id_allocation_chunk_size);
1676 if (!resource_provider) 1677 if (!resource_provider)
1677 return false; 1678 return false;
1678 1679
1679 if (output_surface->capabilities().deferred_gl_initialization) 1680 if (output_surface->capabilities().deferred_gl_initialization)
1680 EnforceZeroBudget(true); 1681 EnforceZeroBudget(true);
1681 1682
1682 bool skip_gl_renderer = false; 1683 bool skip_gl_renderer = false;
1683 CreateAndSetRenderer( 1684 CreateAndSetRenderer(
1684 output_surface.get(), resource_provider.get(), skip_gl_renderer); 1685 output_surface.get(), resource_provider.get(), skip_gl_renderer);
1685 1686
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 std::set<UIResourceId>::iterator found_in_evicted = 2814 std::set<UIResourceId>::iterator found_in_evicted =
2814 evicted_ui_resources_.find(uid); 2815 evicted_ui_resources_.find(uid);
2815 if (found_in_evicted == evicted_ui_resources_.end()) 2816 if (found_in_evicted == evicted_ui_resources_.end())
2816 return; 2817 return;
2817 evicted_ui_resources_.erase(found_in_evicted); 2818 evicted_ui_resources_.erase(found_in_evicted);
2818 if (evicted_ui_resources_.empty()) 2819 if (evicted_ui_resources_.empty())
2819 client_->OnCanDrawStateChanged(CanDraw()); 2820 client_->OnCanDrawStateChanged(CanDraw());
2820 } 2821 }
2821 2822
2822 } // namespace cc 2823 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698