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

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: Fix blimp issue 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) 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 4319 matching lines...) Expand 10 before | Expand all | Expand 10 after
4443 blink::DOMWindow* domWindow = frame->domWindow(); 4445 blink::DOMWindow* domWindow = frame->domWindow();
4444 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow); 4446 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow);
4445 for (size_t i = 0; i < events.size(); ++i) { 4447 for (size_t i = 0; i < events.size(); ++i) {
4446 if (eventType == CompositeEvent) 4448 if (eventType == CompositeEvent)
4447 performance->addCompositeTiming(domWindow->document(), events[i].sou rceFrame, events[i].startTime); 4449 performance->addCompositeTiming(domWindow->document(), events[i].sou rceFrame, events[i].startTime);
4448 else if (eventType == RenderEvent) 4450 else if (eventType == RenderEvent)
4449 performance->addRenderTiming(domWindow->document(), events[i].source Frame, events[i].startTime, events[i].finishTime); 4451 performance->addRenderTiming(domWindow->document(), events[i].source Frame, events[i].startTime, events[i].finishTime);
4450 } 4452 }
4451 } 4453 }
4452 4454
4455 void WebViewImpl::applyMutations(const WebCompositorMutations& mutations)
4456 {
4457 TRACE_EVENT0("compositor-worker", "WebViewImpl::applyMutations");
4458 for (const auto& entry : static_cast<const CompositorMutations&>(mutations). map) {
4459 int elementId = entry.key;
4460 const CompositorMutation& mutation = *entry.value;
4461 Node* node = DOMNodeIds::nodeForId(elementId);
4462 if (!node || !toElement(node))
4463 continue;
4464 toElement(node)->updateFromMutation(mutation);
4465 }
4466 }
4467
4453 void WebViewImpl::updateLayerTreeViewport() 4468 void WebViewImpl::updateLayerTreeViewport()
4454 { 4469 {
4455 if (!page() || !m_layerTreeView) 4470 if (!page() || !m_layerTreeView)
4456 return; 4471 return;
4457 4472
4458 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); 4473 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor());
4459 } 4474 }
4460 4475
4461 void WebViewImpl::updateLayerTreeBackgroundColor() 4476 void WebViewImpl::updateLayerTreeBackgroundColor()
4462 { 4477 {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
4634 { 4649 {
4635 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4650 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4636 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4651 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4637 if (!page()) 4652 if (!page())
4638 return 1; 4653 return 1;
4639 4654
4640 return page()->deviceScaleFactor(); 4655 return page()->deviceScaleFactor();
4641 } 4656 }
4642 4657
4643 } // namespace blink 4658 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698