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

Side by Side Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . Created 5 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
« no previous file with comments | « cc/layers/delegated_renderer_layer_unittest.cc ('k') | cc/layers/layer.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 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/heads_up_display_layer_impl.h" 5 #include "cc/layers/heads_up_display_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 resource.swap(resources_.back()); 96 resource.swap(resources_.back());
97 return; 97 return;
98 } 98 }
99 } 99 }
100 100
101 scoped_ptr<ScopedResource> resource = 101 scoped_ptr<ScopedResource> resource =
102 ScopedResource::Create(resource_provider); 102 ScopedResource::Create(resource_provider);
103 resource->Allocate(internal_content_bounds_, 103 resource->Allocate(internal_content_bounds_,
104 ResourceProvider::TEXTURE_HINT_IMMUTABLE, 104 ResourceProvider::TEXTURE_HINT_IMMUTABLE,
105 resource_provider->best_texture_format()); 105 resource_provider->best_texture_format());
106 resources_.push_back(resource.Pass()); 106 resources_.push_back(std::move(resource));
107 } 107 }
108 108
109 void HeadsUpDisplayLayerImpl::ReleaseUnmatchedSizeResources( 109 void HeadsUpDisplayLayerImpl::ReleaseUnmatchedSizeResources(
110 ResourceProvider* resource_provider) { 110 ResourceProvider* resource_provider) {
111 auto it_erase = 111 auto it_erase =
112 std::remove_if(resources_.begin(), resources_.end(), 112 std::remove_if(resources_.begin(), resources_.end(),
113 [this](const scoped_ptr<ScopedResource>& resource) { 113 [this](const scoped_ptr<ScopedResource>& resource) {
114 return internal_content_bounds_ != resource->size(); 114 return internal_content_bounds_ != resource->size();
115 }); 115 });
116 resources_.erase(it_erase, resources_.end()); 116 resources_.erase(it_erase, resources_.end());
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 return "cc::HeadsUpDisplayLayerImpl"; 791 return "cc::HeadsUpDisplayLayerImpl";
792 } 792 }
793 793
794 void HeadsUpDisplayLayerImpl::AsValueInto( 794 void HeadsUpDisplayLayerImpl::AsValueInto(
795 base::trace_event::TracedValue* dict) const { 795 base::trace_event::TracedValue* dict) const {
796 LayerImpl::AsValueInto(dict); 796 LayerImpl::AsValueInto(dict);
797 dict->SetString("layer_name", "Heads Up Display Layer"); 797 dict->SetString("layer_name", "Heads Up Display Layer");
798 } 798 }
799 799
800 } // namespace cc 800 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_unittest.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698