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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1602343002: compositor-worker: cc->blink mutation plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-ian-patch
Patch Set: rebase Created 4 years, 10 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "web/WebViewImpl.h" 31 #include "web/WebViewImpl.h"
32 32
33 #include "core/CSSValueKeywords.h" 33 #include "core/CSSValueKeywords.h"
34 #include "core/HTMLNames.h" 34 #include "core/HTMLNames.h"
35 #include "core/InputTypeNames.h" 35 #include "core/InputTypeNames.h"
36 #include "core/clipboard/DataObject.h" 36 #include "core/clipboard/DataObject.h"
37 #include "core/dom/DOMNodeIds.h"
37 #include "core/dom/Document.h" 38 #include "core/dom/Document.h"
38 #include "core/dom/Fullscreen.h" 39 #include "core/dom/Fullscreen.h"
39 #include "core/dom/LayoutTreeBuilderTraversal.h" 40 #include "core/dom/LayoutTreeBuilderTraversal.h"
40 #include "core/dom/Text.h" 41 #include "core/dom/Text.h"
41 #include "core/editing/EditingUtilities.h" 42 #include "core/editing/EditingUtilities.h"
42 #include "core/editing/Editor.h" 43 #include "core/editing/Editor.h"
43 #include "core/editing/FrameSelection.h" 44 #include "core/editing/FrameSelection.h"
44 #include "core/editing/InputMethodController.h" 45 #include "core/editing/InputMethodController.h"
45 #include "core/editing/iterators/TextIterator.h" 46 #include "core/editing/iterators/TextIterator.h"
46 #include "core/editing/markers/DocumentMarkerController.h" 47 #include "core/editing/markers/DocumentMarkerController.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #include "platform/NotImplemented.h" 105 #include "platform/NotImplemented.h"
105 #include "platform/PlatformGestureEvent.h" 106 #include "platform/PlatformGestureEvent.h"
106 #include "platform/PlatformKeyboardEvent.h" 107 #include "platform/PlatformKeyboardEvent.h"
107 #include "platform/PlatformMouseEvent.h" 108 #include "platform/PlatformMouseEvent.h"
108 #include "platform/RuntimeEnabledFeatures.h" 109 #include "platform/RuntimeEnabledFeatures.h"
109 #include "platform/TraceEvent.h" 110 #include "platform/TraceEvent.h"
110 #include "platform/UserGestureIndicator.h" 111 #include "platform/UserGestureIndicator.h"
111 #include "platform/exported/WebActiveGestureAnimation.h" 112 #include "platform/exported/WebActiveGestureAnimation.h"
112 #include "platform/fonts/FontCache.h" 113 #include "platform/fonts/FontCache.h"
113 #include "platform/graphics/Color.h" 114 #include "platform/graphics/Color.h"
115 #include "platform/graphics/CompositorMutation.h"
114 #include "platform/graphics/FirstPaintInvalidationTracking.h" 116 #include "platform/graphics/FirstPaintInvalidationTracking.h"
115 #include "platform/graphics/GraphicsContext.h" 117 #include "platform/graphics/GraphicsContext.h"
116 #include "platform/graphics/Image.h" 118 #include "platform/graphics/Image.h"
117 #include "platform/graphics/ImageBuffer.h" 119 #include "platform/graphics/ImageBuffer.h"
118 #include "platform/graphics/gpu/DrawingBuffer.h" 120 #include "platform/graphics/gpu/DrawingBuffer.h"
119 #include "platform/graphics/paint/DrawingRecorder.h" 121 #include "platform/graphics/paint/DrawingRecorder.h"
120 #include "platform/scroll/ScrollbarTheme.h" 122 #include "platform/scroll/ScrollbarTheme.h"
121 #include "platform/weborigin/SchemeRegistry.h" 123 #include "platform/weborigin/SchemeRegistry.h"
122 #include "public/platform/Platform.h" 124 #include "public/platform/Platform.h"
123 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" 125 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
(...skipping 4326 matching lines...) Expand 10 before | Expand all | Expand 10 after
4450 blink::DOMWindow* domWindow = frame->domWindow(); 4452 blink::DOMWindow* domWindow = frame->domWindow();
4451 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow); 4453 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow);
4452 for (size_t i = 0; i < events.size(); ++i) { 4454 for (size_t i = 0; i < events.size(); ++i) {
4453 if (eventType == CompositeEvent) 4455 if (eventType == CompositeEvent)
4454 performance->addCompositeTiming(domWindow->document(), events[i].sou rceFrame, events[i].startTime); 4456 performance->addCompositeTiming(domWindow->document(), events[i].sou rceFrame, events[i].startTime);
4455 else if (eventType == RenderEvent) 4457 else if (eventType == RenderEvent)
4456 performance->addRenderTiming(domWindow->document(), events[i].source Frame, events[i].startTime, events[i].finishTime); 4458 performance->addRenderTiming(domWindow->document(), events[i].source Frame, events[i].startTime, events[i].finishTime);
4457 } 4459 }
4458 } 4460 }
4459 4461
4462 void WebViewImpl::applyCompositorMutations(const WebCompositorMutations& mutatio ns)
4463 {
4464 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "WebViewImpl::a pplyCompositorMutations");
4465 for (const auto& entry : static_cast<const CompositorMutations&>(mutations). map) {
4466 int elementId = entry.key;
4467 const CompositorMutation& mutation = *entry.value;
4468 if (Node* node = DOMNodeIds::nodeForId(elementId))
4469 toElement(node)->updateFromCompositorMutation(mutation);
4470 }
4471 }
4472
4460 void WebViewImpl::updateLayerTreeViewport() 4473 void WebViewImpl::updateLayerTreeViewport()
4461 { 4474 {
4462 if (!page() || !m_layerTreeView) 4475 if (!page() || !m_layerTreeView)
4463 return; 4476 return;
4464 4477
4465 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); 4478 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor());
4466 } 4479 }
4467 4480
4468 void WebViewImpl::updateLayerTreeBackgroundColor() 4481 void WebViewImpl::updateLayerTreeBackgroundColor()
4469 { 4482 {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
4641 { 4654 {
4642 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4655 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4643 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4656 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4644 if (!page()) 4657 if (!page())
4645 return 1; 4658 return 1;
4646 4659
4647 return page()->deviceScaleFactor(); 4660 return page()->deviceScaleFactor();
4648 } 4661 }
4649 4662
4650 } // namespace blink 4663 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698