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

Side by Side Diff: components/exo/surface.cc

Issue 2098953003: Make cc::CompositorFrames movable [Part 2 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed exo unittests Created 4 years, 5 months 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/test/pixel_test_delegating_output_surface.cc ('k') | components/exo/surface_unittest.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 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 delegated_frame->resource_list.push_back(current_resource_); 802 delegated_frame->resource_list.push_back(current_resource_);
803 } else { 803 } else {
804 cc::SolidColorDrawQuad* solid_quad = 804 cc::SolidColorDrawQuad* solid_quad =
805 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); 805 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>();
806 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); 806 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false);
807 } 807 }
808 808
809 delegated_frame->render_pass_list.push_back(std::move(render_pass)); 809 delegated_frame->render_pass_list.push_back(std::move(render_pass));
810 std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); 810 cc::CompositorFrame frame;
811 frame->delegated_frame_data = std::move(delegated_frame); 811 frame.delegated_frame_data = std::move(delegated_frame);
812 812
813 factory_owner_->surface_factory_->SubmitCompositorFrame( 813 factory_owner_->surface_factory_->SubmitCompositorFrame(
814 surface_id_, std::move(frame), cc::SurfaceFactory::DrawCallback()); 814 surface_id_, std::move(frame), cc::SurfaceFactory::DrawCallback());
815 } 815 }
816 816
817 int64_t Surface::SetPropertyInternal(const void* key, 817 int64_t Surface::SetPropertyInternal(const void* key,
818 const char* name, 818 const char* name,
819 PropertyDeallocator deallocator, 819 PropertyDeallocator deallocator,
820 int64_t value, 820 int64_t value,
821 int64_t default_value) { 821 int64_t default_value) {
(...skipping 12 matching lines...) Expand all
834 834
835 int64_t Surface::GetPropertyInternal(const void* key, 835 int64_t Surface::GetPropertyInternal(const void* key,
836 int64_t default_value) const { 836 int64_t default_value) const {
837 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); 837 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key);
838 if (iter == prop_map_.end()) 838 if (iter == prop_map_.end())
839 return default_value; 839 return default_value;
840 return iter->second.value; 840 return iter->second.value;
841 } 841 }
842 842
843 } // namespace exo 843 } // namespace exo
OLDNEW
« no previous file with comments | « cc/test/pixel_test_delegating_output_surface.cc ('k') | components/exo/surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698