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

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index bd2e7d0eb13c08cb79ab1b1e91874542156faa95..689088293c07bb87801f9f25cea2258aff369b2a 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -69,6 +69,7 @@
#include "platform/exported/WrappedResourceResponse.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayer.h"
+#include "platform/graphics/paint/CullRect.h"
#include "platform/scroll/ScrollAnimator.h"
#include "platform/scroll/ScrollbarTheme.h"
#include "public/platform/Platform.h"
@@ -110,19 +111,19 @@ void WebPluginContainerImpl::layoutIfNeeded()
m_webPlugin->layoutIfNeeded();
}
-void WebPluginContainerImpl::paint(GraphicsContext* context, const IntRect& rect) const
+void WebPluginContainerImpl::paint(GraphicsContext* context, const CullRect& cullRect) const
{
if (!parent())
return;
// Don't paint anything if the plugin doesn't intersect.
- if (!frameRect().intersects(rect))
+ if (!cullRect.intersectsCullRect(frameRect()))
return;
if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, LayoutPoint()))
return;
- LayoutObjectDrawingRecorder drawingRecorder(*context, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, rect, LayoutPoint());
+ LayoutObjectDrawingRecorder drawingRecorder(*context, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, cullRect.m_rect, LayoutPoint());
context->save();
ASSERT(parent()->isFrameView());
@@ -135,7 +136,7 @@ void WebPluginContainerImpl::paint(GraphicsContext* context, const IntRect& rect
WebCanvas* canvas = context->canvas();
- IntRect windowRect = view->contentsToRootFrame(rect);
+ IntRect windowRect = view->contentsToRootFrame(cullRect.m_rect);
m_webPlugin->paint(canvas, windowRect);
context->restore();
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698