Bug 1491442 - Fix comments that talk about BasicLayers but intend to say BasicCompositor. r=mattwoodrow
authorMarkus Stange <mstange@themasta.com>
Fri, 16 Aug 2019 01:10:40 +0000
changeset 488403 9216803cdf01a74cb7f66632e04dae97651f3913
parent 488402 82b63cd1a2d378c8ffd461b27b24a07d758be866
child 488404 d66f54731eeb5e3117561152005e9a48a22c3838
push id113908
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 09:57:53 +0000
treeherdermozilla-inbound@83fad6abe38a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1491442
milestone70.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 1491442 - Fix comments that talk about BasicLayers but intend to say BasicCompositor. r=mattwoodrow BasicLayers is main thread drawing. BasicCompositor is compositor-thread drawing. Differential Revision: https://phabricator.services.mozilla.com/D38749
widget/cocoa/nsChildView.h
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.h
+++ b/widget/cocoa/nsChildView.h
@@ -638,17 +638,17 @@ class nsChildView final : public nsBaseW
   mutable CGFloat mBackingScaleFactor;
 
   bool mVisible;
   bool mDrawing;
   bool mIsDispatchPaint;  // Is a paint event being dispatched
 
   bool mPluginFocused;
 
-  // Used in OMTC BasicLayers mode. Presents the BasicCompositor result
+  // Used in BasicCompositor OMTC mode. Presents the BasicCompositor result
   // surface to the screen using an OpenGL context.
   mozilla::UniquePtr<GLPresenter> mGLPresenter;
 
   mozilla::UniquePtr<mozilla::VibrancyManager> mVibrancyManager;
   RefPtr<mozilla::SwipeTracker> mSwipeTracker;
   mozilla::UniquePtr<mozilla::SwipeEventQueue> mSwipeEventQueue;
 
   // Only used for drawRect-based painting in popups.
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -245,20 +245,19 @@ static NSMutableDictionary* sNativeKeyEv
 // Flips a screen coordinate from a point in the cocoa coordinate system (bottom-left rect) to a
 // point that is a "flipped" cocoa coordinate system (starts in the top-left).
 static inline void FlipCocoaScreenCoordinate(NSPoint& inPoint) {
   inPoint.y = nsCocoaUtils::FlippedScreenY(inPoint.y);
 }
 
 namespace {
 
-// Used for OpenGL drawing from the compositor thread for OMTC BasicLayers.
-// We need to use OpenGL for this because there seems to be no other robust
-// way of drawing from a secondary thread without locking, which would cause
-// deadlocks in our setup. See bug 882523.
+// Used for OpenGL drawing from the compositor thread for BasicCompositor OMTC.
+// This was created at a time when we didn't know how to use CoreAnimation for
+// robust off-main-thread drawing.
 class GLPresenter : public GLManager {
  public:
   static mozilla::UniquePtr<GLPresenter> CreateForWindow(nsIWidget* aWindow) {
     // Contrary to CompositorOGL, we allow unaccelerated OpenGL contexts to be
     // used. BasicCompositor only requires very basic GL functionality.
     bool forWebRender = false;
     RefPtr<GLContext> context =
         gl::GLContextProvider::CreateForWindow(aWindow, forWebRender, false);