Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/exo/surface.h" | 5 #include "components/exo/surface.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 // the layer may be mirrored, in which case a surface change causes the | 416 // the layer may be mirrored, in which case a surface change causes the |
| 417 // mirror layer to update its surface using the latest bounds. | 417 // mirror layer to update its surface using the latest bounds. |
| 418 window_->layer()->SetBounds( | 418 window_->layer()->SetBounds( |
| 419 gfx::Rect(window_->layer()->bounds().origin(), content_size_)); | 419 gfx::Rect(window_->layer()->bounds().origin(), content_size_)); |
| 420 window_->layer()->SetShowSurface( | 420 window_->layer()->SetShowSurface( |
| 421 cc::SurfaceId(frame_sink_id_, local_frame_id_), | 421 cc::SurfaceId(frame_sink_id_, local_frame_id_), |
| 422 base::Bind(&CompositorFrameSinkHolder::Satisfy, | 422 base::Bind(&CompositorFrameSinkHolder::Satisfy, |
| 423 compositor_frame_sink_holder_), | 423 compositor_frame_sink_holder_), |
| 424 base::Bind(&CompositorFrameSinkHolder::Require, | 424 base::Bind(&CompositorFrameSinkHolder::Require, |
| 425 compositor_frame_sink_holder_), | 425 compositor_frame_sink_holder_), |
| 426 content_size_, contents_surface_to_layer_scale, content_size_); | 426 content_size_, contents_surface_to_layer_scale); |
|
Fady Samuel
2016/12/14 00:33:16
Doesn't this mean we're changing behavior? Both DI
Saman Sami
2016/12/14 00:39:46
The scale is always one (see line 414), so it's fi
| |
| 427 window_->layer()->SetFillsBoundsOpaquely( | 427 window_->layer()->SetFillsBoundsOpaquely( |
| 428 state_.blend_mode == SkBlendMode::kSrc || | 428 state_.blend_mode == SkBlendMode::kSrc || |
| 429 state_.opaque_region.contains( | 429 state_.opaque_region.contains( |
| 430 gfx::RectToSkIRect(gfx::Rect(content_size_)))); | 430 gfx::RectToSkIRect(gfx::Rect(content_size_)))); |
| 431 } | 431 } |
| 432 | 432 |
| 433 // Reset damage. | 433 // Reset damage. |
| 434 pending_damage_.setEmpty(); | 434 pending_damage_.setEmpty(); |
| 435 | 435 |
| 436 DCHECK(!current_resource_.id || | 436 DCHECK(!current_resource_.id || |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 765 | 765 |
| 766 int64_t Surface::GetPropertyInternal(const void* key, | 766 int64_t Surface::GetPropertyInternal(const void* key, |
| 767 int64_t default_value) const { | 767 int64_t default_value) const { |
| 768 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); | 768 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); |
| 769 if (iter == prop_map_.end()) | 769 if (iter == prop_map_.end()) |
| 770 return default_value; | 770 return default_value; |
| 771 return iter->second.value; | 771 return iter->second.value; |
| 772 } | 772 } |
| 773 | 773 |
| 774 } // namespace exo | 774 } // namespace exo |
| OLD | NEW |