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

Side by Side Diff: content/browser/compositor/image_transport_factory.h

Issue 1097223002: Mac: Fix black flashing during tab switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wait for swap to draw frames Created 5 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Gets a GLHelper instance, associated with the shared context. This 78 // Gets a GLHelper instance, associated with the shared context. This
79 // GLHelper will get destroyed whenever the shared context is lost 79 // GLHelper will get destroyed whenever the shared context is lost
80 // (ImageTransportFactoryObserver::OnLostResources is called). 80 // (ImageTransportFactoryObserver::OnLostResources is called).
81 virtual GLHelper* GetGLHelper() = 0; 81 virtual GLHelper* GetGLHelper() = 0;
82 82
83 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; 83 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0;
84 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; 84 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0;
85 85
86 #if defined(OS_MACOSX) 86 #if defined(OS_MACOSX)
87 virtual void OnSurfaceDisplayed(int surface_id) = 0; 87 virtual void OnSurfaceDisplayed(int surface_id) = 0;
88 // Called when the ui::Compositor has been disconnected from an NSView and 88 // Called with |suspended| as true when the ui::Compositor has been
89 // may be attached to another one. This ensures that content and frames 89 // disconnected from an NSView and may be attached to another one. Called
90 // intended for the old NSView will not appear in the new NSView. 90 // with |suspended| as false after the ui::Compositor has been connected to
91 virtual void OnCompositorRecycled(ui::Compositor* compositor) = 0; 91 // a new NSView and the first commit targeted at the new NSView has
92 // completed. This ensures that content and frames intended for the old
93 // NSView will not flash in the new NSView.
94 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
95 bool suspended) = 0;
92 // Used by GpuProcessHostUIShim to determine if a frame should not be 96 // Used by GpuProcessHostUIShim to determine if a frame should not be
93 // displayed because it is targetted to an NSView that has been disconnected. 97 // displayed because it is targetted to an NSView that has been disconnected.
94 virtual bool SurfaceShouldNotShowFramesAfterRecycle(int surface_id) const = 0; 98 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle(
99 int surface_id) const = 0;
95 #endif 100 #endif
96 }; 101 };
97 102
98 } // namespace content 103 } // namespace content
99 104
100 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 105 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698