| 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 uv_bottom_right, SK_ColorTRANSPARENT, vertex_opacity, | 793 uv_bottom_right, SK_ColorTRANSPARENT, vertex_opacity, |
| 794 false, false, state_.only_visible_on_secure_output); | 794 false, false, state_.only_visible_on_secure_output); |
| 795 delegated_frame->resource_list.push_back(current_resource_); | 795 delegated_frame->resource_list.push_back(current_resource_); |
| 796 } else { | 796 } else { |
| 797 cc::SolidColorDrawQuad* solid_quad = | 797 cc::SolidColorDrawQuad* solid_quad = |
| 798 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); | 798 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); |
| 799 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); | 799 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); |
| 800 } | 800 } |
| 801 | 801 |
| 802 delegated_frame->render_pass_list.push_back(std::move(render_pass)); | 802 delegated_frame->render_pass_list.push_back(std::move(render_pass)); |
| 803 std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 803 cc::CompositorFrame frame; |
| 804 frame->delegated_frame_data = std::move(delegated_frame); | 804 frame.delegated_frame_data = std::move(delegated_frame); |
| 805 | 805 |
| 806 factory_owner_->surface_factory_->SubmitCompositorFrame( | 806 factory_owner_->surface_factory_->SubmitCompositorFrame( |
| 807 surface_id_, std::move(frame), cc::SurfaceFactory::DrawCallback()); | 807 surface_id_, std::move(frame), cc::SurfaceFactory::DrawCallback()); |
| 808 } | 808 } |
| 809 | 809 |
| 810 int64_t Surface::SetPropertyInternal(const void* key, | 810 int64_t Surface::SetPropertyInternal(const void* key, |
| 811 const char* name, | 811 const char* name, |
| 812 PropertyDeallocator deallocator, | 812 PropertyDeallocator deallocator, |
| 813 int64_t value, | 813 int64_t value, |
| 814 int64_t default_value) { | 814 int64_t default_value) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 827 | 827 |
| 828 int64_t Surface::GetPropertyInternal(const void* key, | 828 int64_t Surface::GetPropertyInternal(const void* key, |
| 829 int64_t default_value) const { | 829 int64_t default_value) const { |
| 830 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); | 830 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); |
| 831 if (iter == prop_map_.end()) | 831 if (iter == prop_map_.end()) |
| 832 return default_value; | 832 return default_value; |
| 833 return iter->second.value; | 833 return iter->second.value; |
| 834 } | 834 } |
| 835 | 835 |
| 836 } // namespace exo | 836 } // namespace exo |
| OLD | NEW |