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

Side by Side Diff: Source/core/rendering/compositing/CompositingLayerAssigner.h

Issue 311813005: Issue repaints for RenderLayers that get new composited backings after (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged. Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 22 matching lines...) Expand all
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class RenderLayer; 36 class RenderLayer;
37 37
38 class CompositingLayerAssigner { 38 class CompositingLayerAssigner {
39 public: 39 public:
40 explicit CompositingLayerAssigner(RenderLayerCompositor*); 40 explicit CompositingLayerAssigner(RenderLayerCompositor*);
41 ~CompositingLayerAssigner(); 41 ~CompositingLayerAssigner();
42 42
43 void assign(RenderLayer* updateRoot, bool& layersChanged); 43 void assign(RenderLayer* updateRoot, bool& layersChanged, Vector<RenderLayer *>& layersNeedingRepaint);
abarth-chromium 2014/06/06 03:22:21 You can also store this sort of variable on the Co
44 44
45 // FIXME: This function should be private. We should remove the one caller 45 // FIXME: This function should be private. We should remove the one caller
46 // once we've fixed the compositing chicken/egg issues. 46 // once we've fixed the compositing chicken/egg issues.
47 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*); 47 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*);
48 48
49 private: 49 private:
50 struct SquashingState { 50 struct SquashingState {
51 SquashingState() 51 SquashingState()
52 : mostRecentMapping(0) 52 : mostRecentMapping(0)
53 , hasMostRecentMapping(false) 53 , hasMostRecentMapping(false)
(...skipping 16 matching lines...) Expand all
70 size_t nextSquashedLayerIndex; 70 size_t nextSquashedLayerIndex;
71 71
72 // The absolute bounding rect of all the squashed layers. 72 // The absolute bounding rect of all the squashed layers.
73 IntRect boundingRect; 73 IntRect boundingRect;
74 74
75 // This is simply the sum of the areas of the squashed rects. This can b e very skewed if the rects overlap, 75 // This is simply the sum of the areas of the squashed rects. This can b e very skewed if the rects overlap,
76 // but should be close enough to drive a heuristic. 76 // but should be close enough to drive a heuristic.
77 uint64_t totalAreaOfSquashedRects; 77 uint64_t totalAreaOfSquashedRects;
78 }; 78 };
79 79
80 void assignLayersToBackingsInternal(RenderLayer*, SquashingState&, bool& lay ersChanged); 80 void assignLayersToBackingsInternal(RenderLayer*, SquashingState&, bool& lay ersChanged, Vector<RenderLayer*>& layersNeedingRepaint);
81 void assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer, bool& layersChanged); 81 void assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer, bool& layersChanged, Vector<RenderLayer*>& layersNeedingRepaint);
82 bool canSquashIntoCurrentSquashingOwner(const RenderLayer*, const SquashingS tate&); 82 bool canSquashIntoCurrentSquashingOwner(const RenderLayer*, const SquashingS tate&);
83 bool squashingWouldExceedSparsityTolerance(const RenderLayer* candidate, con st SquashingState&); 83 bool squashingWouldExceedSparsityTolerance(const RenderLayer* candidate, con st SquashingState&);
84 bool updateSquashingAssignment(RenderLayer*, SquashingState&, CompositingSta teTransitionType); 84 bool updateSquashingAssignment(RenderLayer*, SquashingState&, CompositingSta teTransitionType, Vector<RenderLayer*>& layersNeedingRepaint);
85 bool needsOwnBacking(const RenderLayer*) const; 85 bool needsOwnBacking(const RenderLayer*) const;
86 86
87 RenderLayerCompositor* m_compositor; 87 RenderLayerCompositor* m_compositor;
88 bool m_layerSquashingEnabled; 88 bool m_layerSquashingEnabled;
89 }; 89 };
90 90
91 } // namespace WebCore 91 } // namespace WebCore
92 92
93 #endif // CompositingLayerAssigner_h 93 #endif // CompositingLayerAssigner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698