Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1959)

Unified Diff: Source/web/WebPluginContainerImpl.cpp

Issue 1164683007: Copy SkMetaData before painting printed plugin contents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebPluginContainerImpl.h ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPluginContainerImpl.cpp
diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp
index 5e5786fc29f3c41f38f7972ec97bd4c5e2cf4a1d..082a224fa574c8cae50f0cea1304dfe5102dab0b 100644
--- a/Source/web/WebPluginContainerImpl.cpp
+++ b/Source/web/WebPluginContainerImpl.cpp
@@ -352,8 +352,11 @@ int WebPluginContainerImpl::printBegin(const WebPrintParams& printParams) const
return m_webPlugin->printBegin(printParams);
}
-bool WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext* gc)
+bool WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext* gc, const IntRect& printRect)
{
+ LayoutObjectDrawingRecorder drawingRecorder(*gc, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, printRect);
+ if (drawingRecorder.canUseCachedDrawing())
+ return true;
gc->save();
WebCanvas* canvas = gc->canvas();
bool ret = m_webPlugin->printPage(pageNumber, canvas);
« no previous file with comments | « Source/web/WebPluginContainerImpl.h ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698