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

Unified Diff: Source/core/paint/TransparencyDisplayItem.cpp

Issue 743523005: Remove m_hasBlendMode from BeginTransparencyDisplayItem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify. Created 6 years, 1 month 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/core/paint/TransparencyDisplayItem.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TransparencyDisplayItem.cpp
diff --git a/Source/core/paint/TransparencyDisplayItem.cpp b/Source/core/paint/TransparencyDisplayItem.cpp
index 39a6b5e95e372fe4fe5152b3f2a6b7386ba1383c..77605749f74b035fee3a09e5c0dd1def7c8bb693 100644
--- a/Source/core/paint/TransparencyDisplayItem.cpp
+++ b/Source/core/paint/TransparencyDisplayItem.cpp
@@ -14,12 +14,13 @@ void BeginTransparencyDisplayItem::replay(GraphicsContext* context)
context->save();
context->clip(m_clipRect);
- if (m_hasBlendMode)
+ bool hasBlendMode = this->hasBlendMode();
+ if (hasBlendMode)
context->setCompositeOperation(context->compositeOperation(), m_blendMode);
context->beginTransparencyLayer(m_opacity);
- if (m_hasBlendMode)
+ if (hasBlendMode)
context->setCompositeOperation(context->compositeOperation(), WebBlendModeNormal);
#ifdef REVEAL_TRANSPARENCY_LAYERS
context->fillRect(clipRect, Color(0.0f, 0.0f, 0.5f, 0.2f));
@@ -32,7 +33,7 @@ WTF::String BeginTransparencyDisplayItem::asDebugString() const
return String::format("{%s, type: \"%s\", clip bounds: [%f,%f,%f,%f], hasBlendMode: %d, blendMode: %d, opacity: %f}",
rendererDebugString(renderer()).utf8().data(), typeAsDebugString(type()).utf8().data(),
m_clipRect.x().toFloat(), m_clipRect.y().toFloat(), m_clipRect.width().toFloat(), m_clipRect.height().toFloat(),
- m_hasBlendMode, m_blendMode, m_opacity);
+ hasBlendMode(), m_blendMode, m_opacity);
}
#endif
« no previous file with comments | « Source/core/paint/TransparencyDisplayItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698