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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 1599673002: compositor-worker: Remove code from cc_blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix blink_platform_unittests Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "core/layout/compositing/GraphicsLayerUpdater.h" 48 #include "core/layout/compositing/GraphicsLayerUpdater.h"
49 #include "core/loader/FrameLoaderClient.h" 49 #include "core/loader/FrameLoaderClient.h"
50 #include "core/page/ChromeClient.h" 50 #include "core/page/ChromeClient.h"
51 #include "core/page/Page.h" 51 #include "core/page/Page.h"
52 #include "core/page/scrolling/ScrollingCoordinator.h" 52 #include "core/page/scrolling/ScrollingCoordinator.h"
53 #include "core/paint/FramePainter.h" 53 #include "core/paint/FramePainter.h"
54 #include "core/paint/TransformRecorder.h" 54 #include "core/paint/TransformRecorder.h"
55 #include "platform/RuntimeEnabledFeatures.h" 55 #include "platform/RuntimeEnabledFeatures.h"
56 #include "platform/ScriptForbiddenScope.h" 56 #include "platform/ScriptForbiddenScope.h"
57 #include "platform/TraceEvent.h" 57 #include "platform/TraceEvent.h"
58 #include "platform/graphics/CompositorMutableProperties.h"
58 #include "platform/graphics/GraphicsLayer.h" 59 #include "platform/graphics/GraphicsLayer.h"
59 #include "platform/graphics/paint/CullRect.h" 60 #include "platform/graphics/paint/CullRect.h"
60 #include "platform/graphics/paint/DrawingRecorder.h" 61 #include "platform/graphics/paint/DrawingRecorder.h"
61 #include "platform/graphics/paint/PaintController.h" 62 #include "platform/graphics/paint/PaintController.h"
62 #include "platform/graphics/paint/TransformDisplayItem.h" 63 #include "platform/graphics/paint/TransformDisplayItem.h"
63 #include "public/platform/Platform.h" 64 #include "public/platform/Platform.h"
64 #include "public/platform/WebCompositorMutableProperties.h"
65 65
66 namespace blink { 66 namespace blink {
67 67
68 PaintLayerCompositor::PaintLayerCompositor(LayoutView& layoutView) 68 PaintLayerCompositor::PaintLayerCompositor(LayoutView& layoutView)
69 : m_layoutView(layoutView) 69 : m_layoutView(layoutView)
70 , m_compositingReasonFinder(layoutView) 70 , m_compositingReasonFinder(layoutView)
71 , m_pendingUpdateType(CompositingUpdateNone) 71 , m_pendingUpdateType(CompositingUpdateNone)
72 , m_hasAcceleratedCompositing(true) 72 , m_hasAcceleratedCompositing(true)
73 , m_compositing(false) 73 , m_compositing(false)
74 , m_rootShouldAlwaysCompositeDirty(true) 74 , m_rootShouldAlwaysCompositeDirty(true)
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 updateType = std::max(updateType, CompositingUpdateRebuildTree); 389 updateType = std::max(updateType, CompositingUpdateRebuildTree);
390 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor dinator()) 390 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor dinator())
391 scrollingCoordinator->notifyGeometryChanged(); 391 scrollingCoordinator->notifyGeometryChanged();
392 } 392 }
393 } 393 }
394 394
395 if (updateType != CompositingUpdateNone) { 395 if (updateType != CompositingUpdateNone) {
396 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) { 396 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) {
397 if (Element* scrollingElement = m_layoutView.document().scrollingEle ment()) { 397 if (Element* scrollingElement = m_layoutView.document().scrollingEle ment()) {
398 uint64_t elementId = 0; 398 uint64_t elementId = 0;
399 uint32_t mutableProperties = WebCompositorMutablePropertyNone; 399 uint32_t mutableProperties = CompositorMutableProperty::kNone;
400 if (scrollingElement->hasCompositorProxy()) { 400 if (scrollingElement->hasCompositorProxy()) {
401 elementId = DOMNodeIds::idForNode(scrollingElement); 401 elementId = DOMNodeIds::idForNode(scrollingElement);
402 mutableProperties = (WebCompositorMutablePropertyScrollLeft | WebCompositorMutablePropertyScrollTop) & scrollingElement->compositorMutablePr operties(); 402 mutableProperties = (CompositorMutableProperty::kScrollLeft | CompositorMutableProperty::kScrollTop) & scrollingElement->compositorMutablePr operties();
403 } 403 }
404 m_scrollLayer->setElementId(elementId); 404 m_scrollLayer->setElementId(elementId);
405 m_scrollLayer->setCompositorMutableProperties(mutableProperties) ; 405 m_scrollLayer->setCompositorMutableProperties(mutableProperties) ;
406 } 406 }
407 } 407 }
408 408
409 GraphicsLayerUpdater updater; 409 GraphicsLayerUpdater updater;
410 updater.update(*updateRoot, layersNeedingPaintInvalidation); 410 updater.update(*updateRoot, layersNeedingPaintInvalidation);
411 411
412 if (updater.needsRebuildTree()) 412 if (updater.needsRebuildTree())
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 } else if (graphicsLayer == m_scrollLayer.get()) { 1203 } else if (graphicsLayer == m_scrollLayer.get()) {
1204 name = "Frame Scrolling Layer"; 1204 name = "Frame Scrolling Layer";
1205 } else { 1205 } else {
1206 ASSERT_NOT_REACHED(); 1206 ASSERT_NOT_REACHED();
1207 } 1207 }
1208 1208
1209 return name; 1209 return name;
1210 } 1210 }
1211 1211
1212 } // namespace blink 1212 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698