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

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: 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
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con text, DisplayItem::ClipLayerFragmentParent, clipRect)); 874 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con text, DisplayItem::ClipLayerFragmentParent, clipRect));
876 // FIXME: why should we have to deal with rounded rect clips here at all? 875 // FIXME: why should we have to deal with rounded rect clips here at all?
877 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting Info, context, clipRect, paintFlags, *clipRecorder); 876 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting Info, context, clipRect, paintFlags, *clipRecorder);
878 } 877 }
879 878
880 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset); 879 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset);
881 } 880 }
882 } 881 }
883 882
884 } // namespace blink 883 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698