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

Side by Side Diff: ui/compositor/layer.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Rebase Created 4 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 | « ui/compositor/compositor.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 // Filters. 175 // Filters.
176 clone->SetLayerSaturation(layer_saturation_); 176 clone->SetLayerSaturation(layer_saturation_);
177 clone->SetLayerBrightness(GetTargetBrightness()); 177 clone->SetLayerBrightness(GetTargetBrightness());
178 clone->SetLayerGrayscale(GetTargetGrayscale()); 178 clone->SetLayerGrayscale(GetTargetGrayscale());
179 clone->SetLayerInverted(layer_inverted_); 179 clone->SetLayerInverted(layer_inverted_);
180 if (alpha_shape_) 180 if (alpha_shape_)
181 clone->SetAlphaShape(base::MakeUnique<SkRegion>(*alpha_shape_)); 181 clone->SetAlphaShape(base::MakeUnique<SkRegion>(*alpha_shape_));
182 182
183 // cc::Layer state. 183 // cc::Layer state.
184 if (surface_layer_ && !surface_layer_->surface_id().is_null()) { 184 if (surface_layer_ && surface_layer_->surface_id().is_valid()) {
185 clone->SetShowSurface( 185 clone->SetShowSurface(
186 surface_layer_->surface_id(), 186 surface_layer_->surface_id(),
187 surface_layer_->satisfy_callback(), 187 surface_layer_->satisfy_callback(),
188 surface_layer_->require_callback(), 188 surface_layer_->require_callback(),
189 surface_layer_->surface_size(), 189 surface_layer_->surface_size(),
190 surface_layer_->surface_scale(), 190 surface_layer_->surface_scale(),
191 frame_size_in_dip_); 191 frame_size_in_dip_);
192 } else if (type_ == LAYER_SOLID_COLOR) { 192 } else if (type_ == LAYER_SOLID_COLOR) {
193 clone->SetColor(GetTargetColor()); 193 clone->SetColor(GetTargetColor());
194 } 194 }
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(), 1175 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(),
1176 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) { 1176 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) {
1177 return mirror_ptr.get() == mirror; 1177 return mirror_ptr.get() == mirror;
1178 }); 1178 });
1179 1179
1180 DCHECK(it != mirrors_.end()); 1180 DCHECK(it != mirrors_.end());
1181 mirrors_.erase(it); 1181 mirrors_.erase(it);
1182 } 1182 }
1183 1183
1184 } // namespace ui 1184 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698