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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add big fat TODOs in scheduler code to implement proper idle task scheduling and ensure GC is runniā€¦ Created 4 years, 7 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 class PaintLayerCompositor; 80 class PaintLayerCompositor;
81 class TopControls; 81 class TopControls;
82 class UserGestureToken; 82 class UserGestureToken;
83 class WebActiveGestureAnimation; 83 class WebActiveGestureAnimation;
84 class WebDevToolsAgentImpl; 84 class WebDevToolsAgentImpl;
85 class WebElement; 85 class WebElement;
86 class WebLayerTreeView; 86 class WebLayerTreeView;
87 class WebLocalFrame; 87 class WebLocalFrame;
88 class WebLocalFrameImpl; 88 class WebLocalFrameImpl;
89 class WebImage; 89 class WebImage;
90 class CompositorMutatorImpl;
90 class WebPagePopupImpl; 91 class WebPagePopupImpl;
91 class WebPlugin; 92 class WebPlugin;
92 class WebRemoteFrame; 93 class WebRemoteFrame;
93 class WebSelection; 94 class WebSelection;
94 class WebSettingsImpl; 95 class WebSettingsImpl;
95 class WebViewScheduler; 96 class WebViewScheduler;
96 97
97 class WEB_EXPORT WebViewImpl final : WTF_NON_EXPORTED_BASE(public WebView) 98 class WEB_EXPORT WebViewImpl final : WTF_NON_EXPORTED_BASE(public WebView)
98 , public RefCounted<WebViewImpl> 99 , public RefCounted<WebViewImpl>
99 , WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget) 100 , WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget)
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 496
496 void updateTopControlsState(WebTopControlsState constraint, WebTopControlsSt ate current, bool animate) override; 497 void updateTopControlsState(WebTopControlsState constraint, WebTopControlsSt ate current, bool animate) override;
497 498
498 TopControls& topControls(); 499 TopControls& topControls();
499 // Called anytime top controls layout height or content offset have changed. 500 // Called anytime top controls layout height or content offset have changed.
500 void didUpdateTopControls(); 501 void didUpdateTopControls();
501 502
502 void forceNextWebGLContextCreationToFail() override; 503 void forceNextWebGLContextCreationToFail() override;
503 void forceNextDrawingBufferCreationToFail() override; 504 void forceNextDrawingBufferCreationToFail() override;
504 505
506 CompositorProxyClient* createCompositorProxyClient();
505 IntSize mainFrameSize(); 507 IntSize mainFrameSize();
506 WebDisplayMode displayMode() const { return m_displayMode; } 508 WebDisplayMode displayMode() const { return m_displayMode; }
507 509
508 PageScaleConstraintsSet& pageScaleConstraintsSet() const; 510 PageScaleConstraintsSet& pageScaleConstraintsSet() const;
509 511
510 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } 512 FloatSize elasticOverscroll() const { return m_elasticOverscroll; }
511 513
512 // Attaches the PaintArtifactCompositor's tree to this WebView's layer tree 514 // Attaches the PaintArtifactCompositor's tree to this WebView's layer tree
513 // view. 515 // view.
514 void attachPaintArtifactCompositor(); 516 void attachPaintArtifactCompositor();
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 float m_zoomFactorOverride; 738 float m_zoomFactorOverride;
737 739
738 bool m_userGestureObserved; 740 bool m_userGestureObserved;
739 bool m_shouldDispatchFirstVisuallyNonEmptyLayout; 741 bool m_shouldDispatchFirstVisuallyNonEmptyLayout;
740 bool m_shouldDispatchFirstLayoutAfterFinishedParsing; 742 bool m_shouldDispatchFirstLayoutAfterFinishedParsing;
741 bool m_shouldDispatchFirstLayoutAfterFinishedLoading; 743 bool m_shouldDispatchFirstLayoutAfterFinishedLoading;
742 WebDisplayMode m_displayMode; 744 WebDisplayMode m_displayMode;
743 745
744 FloatSize m_elasticOverscroll; 746 FloatSize m_elasticOverscroll;
745 747
748 // This is owned by the LayerTreeHostImpl, and should only be used on the
749 // compositor thread. The LayerTreeHostImpl is indirectly owned by this
750 // class so this pointer should be valid until this class is destructed.
haraken 2016/05/06 02:45:51 Then can we remove the m_mutator by looking up the
flackr 2016/05/06 18:15:08 We might technically be able to get it through Web
751 CrossThreadPersistent<CompositorMutatorImpl> m_mutator;
752
746 Persistent<EventListener> m_popupMouseWheelEventListener; 753 Persistent<EventListener> m_popupMouseWheelEventListener;
747 754
748 WebPageImportanceSignals m_pageImportanceSignals; 755 WebPageImportanceSignals m_pageImportanceSignals;
749 756
750 const OwnPtr<WebViewScheduler> m_scheduler; 757 const OwnPtr<WebViewScheduler> m_scheduler;
751 758
752 // Manages the layer tree created for this page in Slimming Paint v2. 759 // Manages the layer tree created for this page in Slimming Paint v2.
753 PaintArtifactCompositor m_paintArtifactCompositor; 760 PaintArtifactCompositor m_paintArtifactCompositor;
754 761
755 double m_lastFrameTimeMonotonic; 762 double m_lastFrameTimeMonotonic;
756 }; 763 };
757 764
758 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView()); 765 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView());
759 // We have no ways to check if the specified WebView is an instance of 766 // We have no ways to check if the specified WebView is an instance of
760 // WebViewImpl because WebViewImpl is the only implementation of WebView. 767 // WebViewImpl because WebViewImpl is the only implementation of WebView.
761 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 768 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
762 769
763 } // namespace blink 770 } // namespace blink
764 771
765 #endif 772 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698