| 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 state_.opaque_region.contains(gfx::RectToSkIRect(quad_rect))) { | 792 state_.opaque_region.contains(gfx::RectToSkIRect(quad_rect))) { |
| 793 opaque_rect = quad_rect; | 793 opaque_rect = quad_rect; |
| 794 } else if (state_.opaque_region.isRect()) { | 794 } else if (state_.opaque_region.isRect()) { |
| 795 opaque_rect = gfx::SkIRectToRect(state_.opaque_region.getBounds()); | 795 opaque_rect = gfx::SkIRectToRect(state_.opaque_region.getBounds()); |
| 796 } | 796 } |
| 797 | 797 |
| 798 texture_quad->SetNew(quad_state, quad_rect, opaque_rect, quad_rect, | 798 texture_quad->SetNew(quad_state, quad_rect, opaque_rect, quad_rect, |
| 799 current_resource_.id, true, uv_top_left, | 799 current_resource_.id, true, uv_top_left, |
| 800 uv_bottom_right, SK_ColorTRANSPARENT, vertex_opacity, | 800 uv_bottom_right, SK_ColorTRANSPARENT, vertex_opacity, |
| 801 false, false, state_.only_visible_on_secure_output); | 801 false, false, state_.only_visible_on_secure_output); |
| 802 if (current_resource_.is_overlay_candidate) |
| 803 texture_quad->set_resource_size_in_pixels(current_resource_.size); |
| 802 delegated_frame->resource_list.push_back(current_resource_); | 804 delegated_frame->resource_list.push_back(current_resource_); |
| 803 } else { | 805 } else { |
| 804 cc::SolidColorDrawQuad* solid_quad = | 806 cc::SolidColorDrawQuad* solid_quad = |
| 805 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); | 807 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); |
| 806 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); | 808 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); |
| 807 } | 809 } |
| 808 | 810 |
| 809 delegated_frame->render_pass_list.push_back(std::move(render_pass)); | 811 delegated_frame->render_pass_list.push_back(std::move(render_pass)); |
| 810 cc::CompositorFrame frame; | 812 cc::CompositorFrame frame; |
| 811 frame.delegated_frame_data = std::move(delegated_frame); | 813 frame.delegated_frame_data = std::move(delegated_frame); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 834 | 836 |
| 835 int64_t Surface::GetPropertyInternal(const void* key, | 837 int64_t Surface::GetPropertyInternal(const void* key, |
| 836 int64_t default_value) const { | 838 int64_t default_value) const { |
| 837 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); | 839 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); |
| 838 if (iter == prop_map_.end()) | 840 if (iter == prop_map_.end()) |
| 839 return default_value; | 841 return default_value; |
| 840 return iter->second.value; | 842 return iter->second.value; |
| 841 } | 843 } |
| 842 | 844 |
| 843 } // namespace exo | 845 } // namespace exo |
| OLD | NEW |