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

Side by Side Diff: trunk/src/cc/layers/delegated_renderer_layer_impl.cc

Issue 13334005: Revert 191400 "cc: Add ‘chromium_code’: 1 to cc.gyp and cc_t..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/delegated_renderer_layer_impl.h" 5 #include "cc/layers/delegated_renderer_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SetRenderPasses(&frame_data->render_pass_list); 110 SetRenderPasses(&frame_data->render_pass_list);
111 resources_.swap(used_resources); 111 resources_.swap(used_resources);
112 } 112 }
113 } 113 }
114 114
115 ResourceProvider::ResourceIdArray unused_resources; 115 ResourceProvider::ResourceIdArray unused_resources;
116 for (ResourceProvider::ResourceIdMap::const_iterator it = 116 for (ResourceProvider::ResourceIdMap::const_iterator it =
117 resource_map.begin(); 117 resource_map.begin();
118 it != resource_map.end(); 118 it != resource_map.end();
119 ++it) { 119 ++it) {
120 bool resource_is_in_current_frame = resources_.count(it->second) > 0; 120 bool resource_is_in_current_frame = resources_.count(it->second);
121 bool resource_is_in_use = resource_provider->InUseByConsumer(it->second); 121 bool resource_is_in_use = resource_provider->InUseByConsumer(it->second);
122 if (!resource_is_in_current_frame && !resource_is_in_use) 122 if (!resource_is_in_current_frame && !resource_is_in_use)
123 unused_resources.push_back(it->second); 123 unused_resources.push_back(it->second);
124 } 124 }
125 resource_provider->PrepareSendToChild( 125 resource_provider->PrepareSendToChild(
126 child_id_, unused_resources, resources_for_ack); 126 child_id_, unused_resources, resources_for_ack);
127 } 127 }
128 128
129 void DelegatedRendererLayerImpl::SetDisplaySize(gfx::Size size) { 129 void DelegatedRendererLayerImpl::SetDisplaySize(gfx::Size size) {
130 if (display_size_ == size) 130 if (display_size_ == size)
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void DelegatedRendererLayerImpl::ClearChildId() { 420 void DelegatedRendererLayerImpl::ClearChildId() {
421 if (!child_id_) 421 if (!child_id_)
422 return; 422 return;
423 423
424 ResourceProvider* resource_provider = layer_tree_impl()->resource_provider(); 424 ResourceProvider* resource_provider = layer_tree_impl()->resource_provider();
425 resource_provider->DestroyChild(child_id_); 425 resource_provider->DestroyChild(child_id_);
426 child_id_ = 0; 426 child_id_ = 0;
427 } 427 }
428 428
429 } // namespace cc 429 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/debug/layer_tree_debug_state.cc ('k') | trunk/src/cc/layers/delegated_renderer_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698