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

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

Issue 776943003: Factor painting code from RenderLayerScrollableArea into ScrollableAreaPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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/BlockPainter.cpp ('k') | Source/core/paint/PartPainter.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/paint/FilterPainter.h" 10 #include "core/paint/FilterPainter.h"
11 #include "core/paint/LayerClipRecorder.h" 11 #include "core/paint/LayerClipRecorder.h"
12 #include "core/paint/ScrollableAreaPainter.h"
12 #include "core/paint/TransparencyRecorder.h" 13 #include "core/paint/TransparencyRecorder.h"
13 #include "core/rendering/ClipPathOperation.h" 14 #include "core/rendering/ClipPathOperation.h"
14 #include "core/rendering/FilterEffectRenderer.h" 15 #include "core/rendering/FilterEffectRenderer.h"
15 #include "core/rendering/PaintInfo.h" 16 #include "core/rendering/PaintInfo.h"
16 #include "core/rendering/RenderBlock.h" 17 #include "core/rendering/RenderBlock.h"
17 #include "core/rendering/RenderLayer.h" 18 #include "core/rendering/RenderLayer.h"
18 #include "core/rendering/RenderView.h" 19 #include "core/rendering/RenderView.h"
19 #include "core/rendering/svg/RenderSVGResourceClipper.h" 20 #include "core/rendering/svg/RenderSVGResourceClipper.h"
20 #include "platform/graphics/GraphicsLayer.h" 21 #include "platform/graphics/GraphicsLayer.h"
21 #include "platform/graphics/paint/DisplayItemList.h" 22 #include "platform/graphics/paint/DisplayItemList.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 { 471 {
471 for (size_t i = 0; i < layerFragments.size(); ++i) { 472 for (size_t i = 0; i < layerFragments.size(); ++i) {
472 const LayerFragment& fragment = layerFragments.at(i); 473 const LayerFragment& fragment = layerFragments.at(i);
473 474
474 OwnPtr<LayerClipRecorder> clipRecorder; 475 OwnPtr<LayerClipRecorder> clipRecorder;
475 476
476 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) { 477 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) {
477 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer (), context, DisplayItem::ClipLayerOverflowControls, fragment.backgroundRect, &l ocalPaintingInfo, fragment.paginationOffset, paintFlags)); 478 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer (), context, DisplayItem::ClipLayerOverflowControls, fragment.backgroundRect, &l ocalPaintingInfo, fragment.paginationOffset, paintFlags));
478 } 479 }
479 if (RenderLayerScrollableArea* scrollableArea = m_renderLayer.scrollable Area()) 480 if (RenderLayerScrollableArea* scrollableArea = m_renderLayer.scrollable Area())
480 scrollableArea->paintOverflowControls(context, roundedIntPoint(toPoi nt(fragment.layerBounds.location() - m_renderLayer.renderBoxLocation() + subPixe lAccumulationIfNeeded(localPaintingInfo.subPixelAccumulation, m_renderLayer.comp ositingState()))), pixelSnappedIntRect(fragment.backgroundRect.rect()), true); 481 ScrollableAreaPainter(*scrollableArea).paintOverflowControls(context , roundedIntPoint(toPoint(fragment.layerBounds.location() - m_renderLayer.render BoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulat ion, m_renderLayer.compositingState()))), pixelSnappedIntRect(fragment.backgroun dRect.rect()), true);
481 } 482 }
482 } 483 }
483 484
484 static bool checkContainingBlockChainForPagination(RenderLayerModelObject* rende rer, RenderBox* ancestorColumnsRenderer) 485 static bool checkContainingBlockChainForPagination(RenderLayerModelObject* rende rer, RenderBox* ancestorColumnsRenderer)
485 { 486 {
486 RenderView* view = renderer->view(); 487 RenderView* view = renderer->view();
487 RenderLayerModelObject* prevBlock = renderer; 488 RenderLayerModelObject* prevBlock = renderer;
488 RenderBlock* containingBlock; 489 RenderBlock* containingBlock;
489 for (containingBlock = renderer->containingBlock(); 490 for (containingBlock = renderer->containingBlock();
490 containingBlock && containingBlock != view && containingBlock != ancesto rColumnsRenderer; 491 containingBlock && containingBlock != view && containingBlock != ancesto rColumnsRenderer;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 if (!m_renderLayer.containsDirtyOverlayScrollbars()) 740 if (!m_renderLayer.containsDirtyOverlayScrollbars())
740 return; 741 return;
741 742
742 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot); 743 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot);
743 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 744 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
744 745
745 m_renderLayer.setContainsDirtyOverlayScrollbars(false); 746 m_renderLayer.setContainsDirtyOverlayScrollbars(false);
746 } 747 }
747 748
748 } // namespace blink 749 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/PartPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698