Bug 1500257 part 6 - Update documentation for RenderFrame and nsDisplayRemote. r=aosmond
authorRyan Hunt <rhunt@eqrion.net>
Wed, 23 Jan 2019 09:34:29 -0600
changeset 458623 fa01a3a883af0adfd9455a154852f4c8b54c9855
parent 458622 5e296f9ed85728bb89cd98115695c25696dc7b7b
child 458624 0d0e20cf0c2e93e2183209b2f49b61414cd8d702
push id35539
push userbtara@mozilla.com
push dateTue, 12 Feb 2019 05:27:54 +0000
treeherdermozilla-central@c0d540e06ce3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond
bugs1500257
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1500257 part 6 - Update documentation for RenderFrame and nsDisplayRemote. r=aosmond The documentation for these pieces are a bit out of date. Differential Revision: https://phabricator.services.mozilla.com/D17446
layout/ipc/RenderFrame.h
--- a/layout/ipc/RenderFrame.h
+++ b/layout/ipc/RenderFrame.h
@@ -22,16 +22,20 @@ class nsSubDocumentFrame;
 namespace mozilla {
 
 namespace layers {
 struct TextureFactoryIdentifier;
 }  // namespace layers
 
 namespace layout {
 
+/**
+ * RenderFrame connects and manages layer trees for remote frames. It is
+ * directly owned by a TabParent and always lives in the parent process.
+ */
 class RenderFrame final {
   typedef mozilla::layers::CompositorOptions CompositorOptions;
   typedef mozilla::layers::LayerManager LayerManager;
   typedef mozilla::layers::LayersId LayersId;
   typedef mozilla::layers::TextureFactoryIdentifier TextureFactoryIdentifier;
 
  public:
   RenderFrame();
@@ -50,20 +54,20 @@ class RenderFrame final {
 
   void GetTextureFactoryIdentifier(
       TextureFactoryIdentifier* aTextureFactoryIdentifier) const;
 
   bool IsInitialized() const { return mInitialized; }
   bool IsLayersConnected() const { return mLayersConnected; }
 
  private:
+  // The process id of the remote frame. This is used by the compositor to
+  // do security checks on incoming layer transactions.
   base::ProcessId mTabProcessId;
-  // When our child frame is pushing transactions directly to the
-  // compositor, this is the ID of its layer tree in the compositor's
-  // context.
+  // The layers id of the remote frame.
   LayersId mLayersId;
   // The compositor options for this layers id. This is only meaningful if
   // the compositor actually knows about this layers id (i.e. when
   // mLayersConnected is true).
   CompositorOptions mCompositorOptions;
 
   RefPtr<nsFrameLoader> mFrameLoader;
   RefPtr<LayerManager> mLayerManager;
@@ -74,19 +78,18 @@ class RenderFrame final {
   // compositor and so this flag is false.
   bool mLayersConnected;
 };
 
 }  // namespace layout
 }  // namespace mozilla
 
 /**
- * A DisplayRemote exists solely to graft a child process's shadow
- * layer tree (for a given RenderFrame) into its parent
- * process's layer tree.
+ * A nsDisplayRemote will graft a remote frame's shadow layer tree (for a given
+ * nsFrameLoader) into its parent frame's layer tree.
  */
 class nsDisplayRemote final : public nsDisplayItem {
   typedef mozilla::dom::TabId TabId;
   typedef mozilla::gfx::Matrix4x4 Matrix4x4;
   typedef mozilla::layers::EventRegionsOverride EventRegionsOverride;
   typedef mozilla::layers::Layer Layer;
   typedef mozilla::layers::LayersId LayersId;
   typedef mozilla::layers::RefLayer RefLayer;