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

Side by Side Diff: cc/surfaces/surface_aggregator.cc

Issue 2908783002: WIP Hittest Component.
Patch Set: improvements from reviewer comments Created 3 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/surfaces/surface_aggregator.h" 5 #include "cc/surfaces/surface_aggregator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 for (const auto& surface_id : frame.metadata.referenced_surfaces) { 753 for (const auto& surface_id : frame.metadata.referenced_surfaces) {
754 if (!contained_surfaces_.count(surface_id)) { 754 if (!contained_surfaces_.count(surface_id)) {
755 result->undrawn_surfaces.insert(surface_id); 755 result->undrawn_surfaces.insert(surface_id);
756 PrewalkTree(surface_id, false, 0, result); 756 PrewalkTree(surface_id, false, 0, result);
757 } 757 }
758 } 758 }
759 759
760 CHECK(debug_weak_this.get()); 760 CHECK(debug_weak_this.get());
761 // TODO(staraz): It shouldn't need to call the callback when the damage is 761 // TODO(staraz): It shouldn't need to call the callback when the damage is
762 // from |surface| and not from |child_surfaces|. 762 // from |surface| and not from |child_surfaces|.
763 if (!damage_rect.IsEmpty()) 763 if (!damage_rect.IsEmpty()) {
rjkroege 2017/06/07 17:16:44 Would we ever want to adjust the HitTestData witho
gklassen 2017/06/07 20:04:43 not sure what you mean?
rjkroege 2017/06/07 20:22:55 It was idle speculation: would we want to alter th
gklassen 2017/06/08 17:09:21 OIC. Currently the only mechanism we have contemp
764 surface->RunWillDrawCallback(damage_rect); 764 surface->RunWillDrawCallback(damage_rect);
765 manager_->SurfaceWillDraw(surface->surface_id());
766 }
765 767
766 CHECK(debug_weak_this.get()); 768 CHECK(debug_weak_this.get());
767 for (const auto& render_pass : frame.render_pass_list) { 769 for (const auto& render_pass : frame.render_pass_list) {
768 if (!render_pass->copy_requests.empty()) { 770 if (!render_pass->copy_requests.empty()) {
769 int remapped_pass_id = RemapPassId(render_pass->id, surface_id); 771 int remapped_pass_id = RemapPassId(render_pass->id, surface_id);
770 copy_request_passes_.insert(remapped_pass_id); 772 copy_request_passes_.insert(remapped_pass_id);
771 } 773 }
772 } 774 }
773 775
774 referenced_surfaces_.erase(referenced_surfaces_.find(surface->surface_id())); 776 referenced_surfaces_.erase(referenced_surfaces_.find(surface->surface_id()));
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 } 932 }
931 933
932 void SurfaceAggregator::SetOutputColorSpace( 934 void SurfaceAggregator::SetOutputColorSpace(
933 const gfx::ColorSpace& blending_color_space, 935 const gfx::ColorSpace& blending_color_space,
934 const gfx::ColorSpace& output_color_space) { 936 const gfx::ColorSpace& output_color_space) {
935 blending_color_space_ = blending_color_space; 937 blending_color_space_ = blending_color_space;
936 output_color_space_ = output_color_space; 938 output_color_space_ = output_color_space;
937 } 939 }
938 940
939 } // namespace cc 941 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698