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

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

Issue 708213002: Remove the HasOwnBackingButPaintsIntoAncestor compositing state. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed more tests. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/rendering/RenderLayer.h » ('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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 static bool paintForFixedRootBackground(const RenderLayer* layer, PaintLayerFlag s paintFlags) 495 static bool paintForFixedRootBackground(const RenderLayer* layer, PaintLayerFlag s paintFlags)
496 { 496 {
497 return layer->renderer()->isDocumentElement() && (paintFlags & PaintLayerPai ntingRootBackgroundOnly); 497 return layer->renderer()->isDocumentElement() && (paintFlags & PaintLayerPai ntingRootBackgroundOnly);
498 } 498 }
499 499
500 bool LayerPainter::shouldPaintLayerInSoftwareMode(const LayerPaintingInfo& paint ingInfo, PaintLayerFlags paintFlags) 500 bool LayerPainter::shouldPaintLayerInSoftwareMode(const LayerPaintingInfo& paint ingInfo, PaintLayerFlags paintFlags)
501 { 501 {
502 DisableCompositingQueryAsserts disabler; 502 DisableCompositingQueryAsserts disabler;
503 503
504 return m_renderLayer.compositingState() == NotComposited 504 return m_renderLayer.compositingState() == NotComposited
505 || m_renderLayer.compositingState() == HasOwnBackingButPaintsIntoAncesto r
506 || (paintingInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers) 505 || (paintingInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers)
507 || ((paintFlags & PaintLayerPaintingReflection) && !m_renderLayer.has3DT ransform()) 506 || ((paintFlags & PaintLayerPaintingReflection) && !m_renderLayer.has3DT ransform())
508 || paintForFixedRootBackground(&m_renderLayer, paintFlags); 507 || paintForFixedRootBackground(&m_renderLayer, paintFlags);
509 } 508 }
510 509
511 static inline LayoutSize subPixelAccumulationIfNeeded(const LayoutSize& subPixel Accumulation, CompositingState compositingState) 510 static inline LayoutSize subPixelAccumulationIfNeeded(const LayoutSize& subPixel Accumulation, CompositingState compositingState)
512 { 511 {
513 // Only apply the sub-pixel accumulation if we don't paint into our own back ing layer, otherwise the position 512 // Only apply the sub-pixel accumulation if we don't paint into our own back ing layer, otherwise the position
514 // of the renderer already includes any sub-pixel offset. 513 // of the renderer already includes any sub-pixel offset.
515 if (compositingState == PaintsIntoOwnBacking) 514 if (compositingState == PaintsIntoOwnBacking)
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con text, DisplayItem::ClipLayerFragmentParent, clipRect)); 846 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con text, DisplayItem::ClipLayerFragmentParent, clipRect));
848 // FIXME: why should we have to deal with rounded rect clips here at all? 847 // FIXME: why should we have to deal with rounded rect clips here at all?
849 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting Info, context, clipRect, paintFlags, *clipRecorder); 848 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting Info, context, clipRect, paintFlags, *clipRecorder);
850 } 849 }
851 850
852 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset); 851 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset);
853 } 852 }
854 } 853 }
855 854
856 } // namespace blink 855 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698