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

Side by Side Diff: Source/core/paint/LayerPainter.cpp

Issue 671813002: Use the stateless GC::fillRect variant when possible. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor LayerPainter update Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/rendering/RenderTheme.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/LayerPainter.h" 6 #include "core/paint/LayerPainter.h"
7 7
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/page/Page.h" 9 #include "core/page/Page.h"
10 #include "core/rendering/ClipPathOperation.h" 10 #include "core/rendering/ClipPathOperation.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 context->clip(clipRect); 131 context->clip(clipRect);
132 132
133 if (m_renderLayer.paintsWithBlendMode()) 133 if (m_renderLayer.paintsWithBlendMode())
134 context->setCompositeOperation(context->compositeOperation(), m_rend erLayer.renderer()->style()->blendMode()); 134 context->setCompositeOperation(context->compositeOperation(), m_rend erLayer.renderer()->style()->blendMode());
135 135
136 context->beginTransparencyLayer(m_renderLayer.renderer()->opacity()); 136 context->beginTransparencyLayer(m_renderLayer.renderer()->opacity());
137 137
138 if (m_renderLayer.paintsWithBlendMode()) 138 if (m_renderLayer.paintsWithBlendMode())
139 context->setCompositeOperation(context->compositeOperation(), WebBle ndModeNormal); 139 context->setCompositeOperation(context->compositeOperation(), WebBle ndModeNormal);
140 #ifdef REVEAL_TRANSPARENCY_LAYERS 140 #ifdef REVEAL_TRANSPARENCY_LAYERS
141 context->setFillColor(Color(0.0f, 0.0f, 0.5f, 0.2f)); 141 context->fillRect(clipRect, Color(0.0f, 0.0f, 0.5f, 0.2f));
142 context->fillRect(clipRect);
143 #endif 142 #endif
144 } 143 }
145 } 144 }
146 145
147 void LayerPainter::paintLayerContentsAndReflection(GraphicsContext* context, con st LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) 146 void LayerPainter::paintLayerContentsAndReflection(GraphicsContext* context, con st LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
148 { 147 {
149 ASSERT(m_renderLayer.isSelfPaintingLayer() || m_renderLayer.hasSelfPaintingL ayerDescendant()); 148 ASSERT(m_renderLayer.isSelfPaintingLayer() || m_renderLayer.hasSelfPaintingL ayerDescendant());
150 149
151 PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform) ; 150 PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform) ;
152 151
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 if (needsToClip(paintingInfo, clipRect)) { 875 if (needsToClip(paintingInfo, clipRect)) {
877 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con text, ClipDisplayItem::LayerFragmentParent, clipRect)); 876 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con text, ClipDisplayItem::LayerFragmentParent, clipRect));
878 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting Info, context, clipRect, paintFlags, *clipRecorder, DoNotIncludeSelfForBorderRad ius); // Child clipping mask painting will handle clipping to self. 877 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting Info, context, clipRect, paintFlags, *clipRecorder, DoNotIncludeSelfForBorderRad ius); // Child clipping mask painting will handle clipping to self.
879 } 878 }
880 879
881 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset); 880 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset);
882 } 881 }
883 } 882 }
884 883
885 } // namespace blink 884 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698