| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 const GlobalPaintFlags globalPaintFlags, IntRect paintingRect, float opacity
) | 591 const GlobalPaintFlags globalPaintFlags, IntRect paintingRect, float opacity
) |
| 592 { | 592 { |
| 593 ASSERT(document()->isActive()); | 593 ASSERT(document()->isActive()); |
| 594 // Not flattening compositing layers will result in a broken image being pai
nted. | 594 // Not flattening compositing layers will result in a broken image being pai
nted. |
| 595 ASSERT(globalPaintFlags & GlobalPaintFlattenCompositingLayers); | 595 ASSERT(globalPaintFlags & GlobalPaintFlattenCompositingLayers); |
| 596 | 596 |
| 597 float deviceScaleFactor = m_host->deviceScaleFactor(); | 597 float deviceScaleFactor = m_host->deviceScaleFactor(); |
| 598 paintingRect.setWidth(paintingRect.width() * deviceScaleFactor); | 598 paintingRect.setWidth(paintingRect.width() * deviceScaleFactor); |
| 599 paintingRect.setHeight(paintingRect.height() * deviceScaleFactor); | 599 paintingRect.setHeight(paintingRect.height() * deviceScaleFactor); |
| 600 | 600 |
| 601 SkPictureBuilder pictureBuilder(paintingRect); | 601 // The content is shifted to origin, to fit within the image bounds - which
are the same |
| 602 // as the picture bounds. |
| 603 SkRect pictureBounds = SkRect::MakeIWH(paintingRect.width(), paintingRect.he
ight()); |
| 604 SkPictureBuilder pictureBuilder(pictureBounds); |
| 602 { | 605 { |
| 603 GraphicsContext& paintContext = pictureBuilder.context(); | 606 GraphicsContext& paintContext = pictureBuilder.context(); |
| 604 | 607 |
| 605 AffineTransform transform; | 608 AffineTransform transform; |
| 606 transform.scale(deviceScaleFactor, deviceScaleFactor); | 609 transform.scale(deviceScaleFactor, deviceScaleFactor); |
| 607 transform.translate(-paintingRect.x(), -paintingRect.y()); | 610 transform.translate(-paintingRect.x(), -paintingRect.y()); |
| 608 TransformRecorder transformRecorder(paintContext, displayItemClient, tra
nsform); | 611 TransformRecorder transformRecorder(paintContext, displayItemClient, tra
nsform); |
| 609 | 612 |
| 610 m_view->paintContents(&paintContext, globalPaintFlags, paintingRect); | 613 m_view->paintContents(&paintContext, globalPaintFlags, paintingRect); |
| 611 | 614 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 { | 847 { |
| 845 if (isLocalRoot()) | 848 if (isLocalRoot()) |
| 846 m_instrumentingAgents = InstrumentingAgents::create(); | 849 m_instrumentingAgents = InstrumentingAgents::create(); |
| 847 else | 850 else |
| 848 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 851 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
| 849 } | 852 } |
| 850 | 853 |
| 851 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); | 854 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); |
| 852 | 855 |
| 853 } // namespace blink | 856 } // namespace blink |
| OLD | NEW |