| OLD | NEW |
| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // Gets a GLHelper instance, associated with the shared context. This | 81 // Gets a GLHelper instance, associated with the shared context. This |
| 82 // GLHelper will get destroyed whenever the shared context is lost | 82 // GLHelper will get destroyed whenever the shared context is lost |
| 83 // (ImageTransportFactoryObserver::OnLostResources is called). | 83 // (ImageTransportFactoryObserver::OnLostResources is called). |
| 84 virtual display_compositor::GLHelper* GetGLHelper() = 0; | 84 virtual display_compositor::GLHelper* GetGLHelper() = 0; |
| 85 | 85 |
| 86 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 86 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
| 87 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 87 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
| 88 | 88 |
| 89 #if defined(OS_MACOSX) | 89 #if defined(OS_MACOSX) |
| 90 virtual void OnGpuSwapBuffersCompleted( | |
| 91 gpu::SurfaceHandle surface_handle, | |
| 92 const std::vector<ui::LatencyInfo>& latency_info, | |
| 93 gfx::SwapResult result) = 0; | |
| 94 | |
| 95 // Called with |suspended| as true when the ui::Compositor has been | 90 // Called with |suspended| as true when the ui::Compositor has been |
| 96 // disconnected from an NSView and may be attached to another one. Called | 91 // disconnected from an NSView and may be attached to another one. Called |
| 97 // with |suspended| as false after the ui::Compositor has been connected to | 92 // with |suspended| as false after the ui::Compositor has been connected to |
| 98 // a new NSView and the first commit targeted at the new NSView has | 93 // a new NSView and the first commit targeted at the new NSView has |
| 99 // completed. This ensures that content and frames intended for the old | 94 // completed. This ensures that content and frames intended for the old |
| 100 // NSView will not flash in the new NSView. | 95 // NSView will not flash in the new NSView. |
| 101 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, | 96 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, |
| 102 bool suspended) = 0; | 97 bool suspended) = 0; |
| 103 // Used by GpuProcessHostUIShim to determine if a frame should not be | 98 // Used by GpuProcessHostUIShim to determine if a frame should not be |
| 104 // displayed because it is targetted to an NSView that has been disconnected. | 99 // displayed because it is targetted to an NSView that has been disconnected. |
| 105 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle( | 100 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle( |
| 106 gpu::SurfaceHandle surface_handle) const = 0; | 101 gpu::SurfaceHandle surface_handle) const = 0; |
| 107 #endif | 102 #endif |
| 108 }; | 103 }; |
| 109 | 104 |
| 110 } // namespace content | 105 } // namespace content |
| 111 | 106 |
| 112 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 107 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
| OLD | NEW |