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

Unified Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 1017593005: Add a basic custom painting facility to Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add missing files Created 5 years, 9 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
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index c0ab2dc08236972ce6087cf7622169f9db579371..c986599473bb56798dfbda9d6f1f6b0e7837d897 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -989,6 +989,12 @@ void RenderBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutP
LayoutRect paintRect = borderBoxRect();
paintRect.moveBy(paintOffset);
paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, paintRect);
+ // TODO(abarth): Currently we only draw m_customPainting if we happen to
ojan 2015/03/19 22:30:04 I think we want to do this before we do any other
abarth-chromium 2015/03/19 22:34:27 Yeah, the main design question is whether these pa
+ // have a box decoration or a background. Instead, we should probably have
+ // another function like paintBoxDecorationBackground that subclasses can
+ // call to draw m_customPainting.
+ if (m_customPainting)
+ paintInfo.context->drawDisplayList(m_customPainting.get(), paintRect.location());
}
void RenderBox::paintBoxDecorationBackgroundWithRect(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const LayoutRect& paintRect)

Powered by Google App Engine
This is Rietveld 408576698