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

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 DEPS issue and some missing methods 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 4307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4431 blink::DOMWindow* domWindow = frame->domWindow(); 4433 blink::DOMWindow* domWindow = frame->domWindow();
4432 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow); 4434 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow);
4433 for (size_t i = 0; i < events.size(); ++i) { 4435 for (size_t i = 0; i < events.size(); ++i) {
4434 if (eventType == CompositeEvent) 4436 if (eventType == CompositeEvent)
4435 performance->addCompositeTiming(domWindow->document(), events[i].sou rceFrame, events[i].startTime); 4437 performance->addCompositeTiming(domWindow->document(), events[i].sou rceFrame, events[i].startTime);
4436 else if (eventType == RenderEvent) 4438 else if (eventType == RenderEvent)
4437 performance->addRenderTiming(domWindow->document(), events[i].source Frame, events[i].startTime, events[i].finishTime); 4439 performance->addRenderTiming(domWindow->document(), events[i].source Frame, events[i].startTime, events[i].finishTime);
4438 } 4440 }
4439 } 4441 }
4440 4442
4443 void WebViewImpl::applyMutations(const WebCompositorMutations& mutations)
4444 {
4445 TRACE_EVENT0("compositor-worker", "WebViewImpl::applyMutations");
4446 for (const auto& entry : static_cast<const CompositorMutations&>(mutations). map) {
4447 int elementId = entry.key;
4448 const CompositorMutation& mutation = *entry.value;
4449 Node* node = DOMNodeIds::nodeForId(elementId);
4450 if (!node || !toElement(node))
4451 continue;
4452 toElement(node)->updateFromMutation(mutation);
4453 }
4454 }
4455
4441 void WebViewImpl::updateLayerTreeViewport() 4456 void WebViewImpl::updateLayerTreeViewport()
4442 { 4457 {
4443 if (!page() || !m_layerTreeView) 4458 if (!page() || !m_layerTreeView)
4444 return; 4459 return;
4445 4460
4446 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); 4461 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor());
4447 } 4462 }
4448 4463
4449 void WebViewImpl::updateLayerTreeBackgroundColor() 4464 void WebViewImpl::updateLayerTreeBackgroundColor()
4450 { 4465 {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
4628 { 4643 {
4629 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4644 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4630 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4645 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4631 if (!page()) 4646 if (!page())
4632 return 1; 4647 return 1;
4633 4648
4634 return page()->deviceScaleFactor(); 4649 return page()->deviceScaleFactor();
4635 } 4650 }
4636 4651
4637 } // namespace blink 4652 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698