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

Unified Diff: cc/surfaces/surface_aggregator.h

Issue 1966073002: Reland: Correctly handle damage involving filters in SurfaceAggregator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_aggregator.h
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index 64991232a1a2d2b32841f660c8e47682d7b11c33..35910f3715f7bcd913683395830748f9736dd4ab 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -56,7 +56,6 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
struct PrewalkResult {
PrewalkResult();
~PrewalkResult();
- bool has_copy_requests = false;
// This is the set of Surfaces that were referenced by another Surface, but
// not included in a SurfaceDrawQuad.
std::set<SurfaceId> undrawn_surfaces;
@@ -85,7 +84,10 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
const ClipData& clip_rect,
RenderPass* dest_pass,
SurfaceId surface_id);
- gfx::Rect PrewalkTree(SurfaceId surface_id, PrewalkResult* result);
+ gfx::Rect PrewalkTree(SurfaceId surface_id,
+ bool in_moved_pixel_pass,
+ RenderPassId parent_pass,
+ PrewalkResult* result);
void CopyUndrawnSurfaces(PrewalkResult* prewalk);
void CopyPasses(const DelegatedFrameData* frame_data, Surface* surface);
@@ -95,6 +97,8 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
// child surfaces.
void ProcessAddedAndRemovedSurfaces();
+ void PropagateCopyRequestPasses();
+
int ChildIdForSurface(Surface* surface);
gfx::Rect DamageRectForSurface(const Surface* surface,
const RenderPass& source,
@@ -136,6 +140,21 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
// This is the pass list for the aggregated frame.
RenderPassList* dest_pass_list_;
+ // This is the set of aggregated pass ids that are affected by filters that
+ // move pixels.
+ std::unordered_set<RenderPassId, RenderPassIdHash> moved_pixel_passes_;
+
+ // This is the set of aggregated pass ids that are drawn by copy requests, so
+ // should not have their damage rects clipped to the root damage rect.
+ std::unordered_set<RenderPassId, RenderPassIdHash> copy_request_passes_;
+
+ // This maps each aggregated pass id to the set of (aggregated) pass ids
+ // that its RenderPassDrawQuads depend on
+ std::unordered_map<RenderPassId,
+ std::unordered_set<RenderPassId, RenderPassIdHash>,
+ RenderPassIdHash>
+ render_pass_dependencies_;
+
// The root damage rect of the currently-aggregating frame.
gfx::Rect root_damage_rect_;

Powered by Google App Engine
This is Rietveld 408576698