OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 { | 308 { |
309 setOffsetDoubleFromLayoutObject(offset); | 309 setOffsetDoubleFromLayoutObject(offset); |
310 } | 310 } |
311 | 311 |
312 void GraphicsLayer::setOffsetDoubleFromLayoutObject(const DoubleSize& offset, Sh
ouldSetNeedsDisplay shouldSetNeedsDisplay) | 312 void GraphicsLayer::setOffsetDoubleFromLayoutObject(const DoubleSize& offset, Sh
ouldSetNeedsDisplay shouldSetNeedsDisplay) |
313 { | 313 { |
314 if (offset == m_offsetFromLayoutObject) | 314 if (offset == m_offsetFromLayoutObject) |
315 return; | 315 return; |
316 | 316 |
317 m_offsetFromLayoutObject = offset; | 317 m_offsetFromLayoutObject = offset; |
| 318 platformLayer()->setFiltersOrigin(FloatPoint() - toFloatSize(offset)); |
318 | 319 |
319 // If the compositing layer offset changes, we need to repaint. | 320 // If the compositing layer offset changes, we need to repaint. |
320 if (shouldSetNeedsDisplay == SetNeedsDisplay) | 321 if (shouldSetNeedsDisplay == SetNeedsDisplay) |
321 setNeedsDisplay(); | 322 setNeedsDisplay(); |
322 } | 323 } |
323 | 324 |
324 LayoutSize GraphicsLayer::offsetFromLayoutObjectWithSubpixelAccumulation() const | 325 LayoutSize GraphicsLayer::offsetFromLayoutObjectWithSubpixelAccumulation() const |
325 { | 326 { |
326 return LayoutSize(offsetFromLayoutObject()) + client()->subpixelAccumulation
(); | 327 return LayoutSize(offsetFromLayoutObject()) + client()->subpixelAccumulation
(); |
327 } | 328 } |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 { | 1351 { |
1351 if (!layer) { | 1352 if (!layer) { |
1352 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1353 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1353 return; | 1354 return; |
1354 } | 1355 } |
1355 | 1356 |
1356 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1357 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1357 fprintf(stderr, "%s\n", output.utf8().data()); | 1358 fprintf(stderr, "%s\n", output.utf8().data()); |
1358 } | 1359 } |
1359 #endif | 1360 #endif |
OLD | NEW |