OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
8 | 8 |
9 #include "CCDamageTracker.h" | 9 #include "CCDamageTracker.h" |
10 | 10 |
11 #include "CCLayerImpl.h" | 11 #include "CCLayerImpl.h" |
12 #include "CCLayerTreeHostCommon.h" | 12 #include "CCLayerTreeHostCommon.h" |
13 #include "CCMathUtil.h" | 13 #include "CCMathUtil.h" |
14 #include "CCRenderSurface.h" | 14 #include "CCRenderSurface.h" |
15 #include <public/WebFilterOperations.h> | 15 #include <public/WebFilterOperations.h> |
16 | 16 |
17 using WebKit::WebTransformationMatrix; | 17 using WebKit::WebTransformationMatrix; |
18 | 18 |
19 namespace WebCore { | 19 namespace cc { |
20 | 20 |
21 PassOwnPtr<CCDamageTracker> CCDamageTracker::create() | 21 PassOwnPtr<CCDamageTracker> CCDamageTracker::create() |
22 { | 22 { |
23 return adoptPtr(new CCDamageTracker()); | 23 return adoptPtr(new CCDamageTracker()); |
24 } | 24 } |
25 | 25 |
26 CCDamageTracker::CCDamageTracker() | 26 CCDamageTracker::CCDamageTracker() |
27 : m_forceFullDamageNextUpdate(false) | 27 : m_forceFullDamageNextUpdate(false) |
28 { | 28 { |
29 m_currentRectHistory = adoptPtr(new RectMap); | 29 m_currentRectHistory = adoptPtr(new RectMap); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 } | 333 } |
334 | 334 |
335 // If the layer has a background filter, this may cause pixels in our surfac
e to be expanded, so we will need to expand any damage | 335 // If the layer has a background filter, this may cause pixels in our surfac
e to be expanded, so we will need to expand any damage |
336 // at or below this layer. We expand the damage from this layer too, as we n
eed to readback those pixels from the surface with only | 336 // at or below this layer. We expand the damage from this layer too, as we n
eed to readback those pixels from the surface with only |
337 // the contents of layers below this one in them. This means we need to redr
aw any pixels in the surface being used for the blur in | 337 // the contents of layers below this one in them. This means we need to redr
aw any pixels in the surface being used for the blur in |
338 // this layer this frame. | 338 // this layer this frame. |
339 if (layer->backgroundFilters().hasFilterThatMovesPixels()) | 339 if (layer->backgroundFilters().hasFilterThatMovesPixels()) |
340 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar
getSpace, layer->backgroundFilters()); | 340 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar
getSpace, layer->backgroundFilters()); |
341 } | 341 } |
342 | 342 |
343 } // namespace WebCore | 343 } // namespace cc |
344 | 344 |
345 #endif // USE(ACCELERATED_COMPOSITING) | 345 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |