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 SkPictureBuilder pictureBuilder(FloatRect(FloatPoint(), paintingRect.size()) ); |
mtklein_C
2015/08/18 14:07:06
Think it's worth adding a note similar to the CL d
f(malita)
2015/08/18 17:40:14
Done.
| |
602 { | 602 { |
603 GraphicsContext& paintContext = pictureBuilder.context(); | 603 GraphicsContext& paintContext = pictureBuilder.context(); |
604 | 604 |
605 AffineTransform transform; | 605 AffineTransform transform; |
606 transform.scale(deviceScaleFactor, deviceScaleFactor); | 606 transform.scale(deviceScaleFactor, deviceScaleFactor); |
607 transform.translate(-paintingRect.x(), -paintingRect.y()); | 607 transform.translate(-paintingRect.x(), -paintingRect.y()); |
Justin Novosad
2015/08/18 14:36:33
I suppose this is the transaction to counteract th
f(malita)
2015/08/18 17:40:14
We're ultimately drawing this into a (0,0) - (pain
| |
608 TransformRecorder transformRecorder(paintContext, displayItemClient, tra nsform); | 608 TransformRecorder transformRecorder(paintContext, displayItemClient, tra nsform); |
609 | 609 |
610 m_view->paintContents(&paintContext, globalPaintFlags, paintingRect); | 610 m_view->paintContents(&paintContext, globalPaintFlags, paintingRect); |
611 | 611 |
612 } | 612 } |
613 RefPtr<const SkPicture> recording = pictureBuilder.endRecording(); | 613 RefPtr<const SkPicture> recording = pictureBuilder.endRecording(); |
614 RefPtr<SkImage> skImage = adoptRef(SkImage::NewFromPicture(recording.get(), | 614 RefPtr<SkImage> skImage = adoptRef(SkImage::NewFromPicture(recording.get(), |
615 SkISize::Make(paintingRect.width(), paintingRect.height()), nullptr, nul lptr)); | 615 SkISize::Make(paintingRect.width(), paintingRect.height()), nullptr, nul lptr)); |
616 RefPtr<Image> image = StaticBitmapImage::create(skImage.release()); | 616 RefPtr<Image> image = StaticBitmapImage::create(skImage.release()); |
617 | 617 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
844 { | 844 { |
845 if (isLocalRoot()) | 845 if (isLocalRoot()) |
846 m_instrumentingAgents = InstrumentingAgents::create(); | 846 m_instrumentingAgents = InstrumentingAgents::create(); |
847 else | 847 else |
848 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 848 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
849 } | 849 } |
850 | 850 |
851 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); | 851 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); |
852 | 852 |
853 } // namespace blink | 853 } // namespace blink |
OLD | NEW |