OLD | NEW |
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 "config.h" | 5 #include "config.h" |
6 #include "platform/graphics/paint/FixedPositionDisplayItem.h" | 6 #include "platform/graphics/paint/FixedPositionDisplayItem.h" |
7 | 7 |
8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
9 #include "platform/transforms/AffineTransform.h" | 9 #include "platform/transforms/AffineTransform.h" |
10 #include "public/platform/WebDisplayItemList.h" | 10 #include "public/platform/WebDisplayItemList.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 void BeginFixedPositionDisplayItem::appendToWebDisplayItemList(WebDisplayItemLis
t* list) const | 14 void BeginFixedPositionDisplayItem::appendToWebDisplayItemList(WebDisplayItemLis
t* list) const |
15 { | 15 { |
16 // TODO(trchen): Should implement the compositor counterpart and update tran
sform tree algorithm. | 16 // Note: This is only temporarily workaround before we implement true |
| 17 // transform-tree-based rasterization. |
| 18 AffineTransform transform; |
| 19 transform.translate(m_counterScroll.width(), m_counterScroll.height()); |
| 20 list->appendTransformItem(affineTransformToSkMatrix(transform)); |
17 } | 21 } |
18 | 22 |
19 void EndFixedPositionDisplayItem::appendToWebDisplayItemList(WebDisplayItemList*
list) const | 23 void EndFixedPositionDisplayItem::appendToWebDisplayItemList(WebDisplayItemList*
list) const |
20 { | 24 { |
21 // TODO(trchen): Should implement the compositor counterpart and update tran
sform tree algorithm. | 25 // Note: This is only temporarily workaround before we implement true |
| 26 // transform-tree-based rasterization. |
| 27 list->appendEndTransformItem(); |
22 } | 28 } |
23 | 29 |
24 } // namespace blink | 30 } // namespace blink |
OLD | NEW |