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

Unified Diff: Source/platform/graphics/paint/CompositingDisplayItem.cpp

Issue 960483002: Implement compositing bounds in CompositingDisplayItem (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase from space Created 5 years, 10 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/platform/graphics/paint/CompositingDisplayItem.h ('k') | public/platform/WebDisplayItemList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/CompositingDisplayItem.cpp
diff --git a/Source/platform/graphics/paint/CompositingDisplayItem.cpp b/Source/platform/graphics/paint/CompositingDisplayItem.cpp
index 8ff2ec06c172bbe29695c5a80a5a4383dbdff985..47f5e54af899e6c362c5c11995c13d69e93b8722 100644
--- a/Source/platform/graphics/paint/CompositingDisplayItem.cpp
+++ b/Source/platform/graphics/paint/CompositingDisplayItem.cpp
@@ -14,13 +14,13 @@ namespace blink {
void BeginCompositingDisplayItem::replay(GraphicsContext* context)
{
- context->beginLayer(m_opacity, m_xferMode, m_clipRect.get(), m_colorFilter);
+ context->beginLayer(m_opacity, m_xferMode, m_hasBounds ? &m_bounds : nullptr, m_colorFilter);
}
void BeginCompositingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) const
{
- // FIXME: Pass across the rect too.
- list->appendCompositingItem(m_opacity, m_xferMode, GraphicsContext::WebCoreColorFilterToSkiaColorFilter(m_colorFilter).get());
+ SkRect bounds = WebCoreFloatRectToSKRect(m_bounds);
+ list->appendCompositingItem(m_opacity, m_xferMode, m_hasBounds ? &bounds : nullptr, GraphicsContext::WebCoreColorFilterToSkiaColorFilter(m_colorFilter).get());
}
#ifndef NDEBUG
@@ -28,6 +28,8 @@ void BeginCompositingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder
{
DisplayItem::dumpPropertiesAsDebugString(stringBuilder);
stringBuilder.append(WTF::String::format(", xferMode: %d, opacity: %f", m_xferMode, m_opacity));
+ if (m_hasBounds)
+ stringBuilder.append(WTF::String::format(", bounds: [%f, %f, %f, %f]", m_bounds.location().x(), m_bounds.location().y(), m_bounds.size().width(), m_bounds.size().height()));
}
#endif
« no previous file with comments | « Source/platform/graphics/paint/CompositingDisplayItem.h ('k') | public/platform/WebDisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698