| 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_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_ |
| 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_ |
| 7 | 7 |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "content/common/gpu/image_transport_surface_fbo_mac.h" | 9 #include "content/common/gpu/image_transport_surface_fbo_mac.h" |
| 10 #include "ui/base/cocoa/remote_layer_api.h" | 10 #include "ui/base/cocoa/remote_layer_api.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 CALayerStorageProvider(ImageTransportSurfaceFBO* transport_surface); | 23 CALayerStorageProvider(ImageTransportSurfaceFBO* transport_surface); |
| 24 ~CALayerStorageProvider() override; | 24 ~CALayerStorageProvider() override; |
| 25 | 25 |
| 26 // ImageTransportSurfaceFBO::StorageProvider implementation: | 26 // ImageTransportSurfaceFBO::StorageProvider implementation: |
| 27 gfx::Size GetRoundedSize(gfx::Size size) override; | 27 gfx::Size GetRoundedSize(gfx::Size size) override; |
| 28 bool AllocateColorBufferStorage( | 28 bool AllocateColorBufferStorage( |
| 29 CGLContextObj context, const base::Closure& context_dirtied_callback, | 29 CGLContextObj context, const base::Closure& context_dirtied_callback, |
| 30 GLuint texture, gfx::Size pixel_size, float scale_factor) override; | 30 GLuint texture, gfx::Size pixel_size, float scale_factor) override; |
| 31 void FreeColorBufferStorage() override; | 31 void FreeColorBufferStorage() override; |
| 32 void SwapBuffers(const gfx::Size& size, float scale_factor) override; | 32 void FrameSizeChanged( |
| 33 const gfx::Size& pixel_size, float scale_factor) override; |
| 34 void SwapBuffers() override; |
| 33 void WillWriteToBackbuffer() override; | 35 void WillWriteToBackbuffer() override; |
| 34 void DiscardBackbuffer() override; | 36 void DiscardBackbuffer() override; |
| 35 void SwapBuffersAckedByBrowser(bool disable_throttling) override; | 37 void SwapBuffersAckedByBrowser(bool disable_throttling) override; |
| 36 | 38 |
| 37 // Interface to ImageTransportLayer: | 39 // Interface to ImageTransportLayer: |
| 38 CGLContextObj LayerShareGroupContext(); | 40 CGLContextObj LayerShareGroupContext(); |
| 39 base::Closure LayerShareGroupContextDirtiedCallback(); | 41 base::Closure LayerShareGroupContextDirtiedCallback(); |
| 40 bool LayerCanDraw(); | 42 bool LayerCanDraw(); |
| 41 void LayerDoDraw(); | 43 void LayerDoDraw(); |
| 42 void LayerResetStorageProvider(); | 44 void LayerResetStorageProvider(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 112 |
| 111 // Weak factory against which a timeout task for forcing a draw is created. | 113 // Weak factory against which a timeout task for forcing a draw is created. |
| 112 base::WeakPtrFactory<CALayerStorageProvider> pending_draw_weak_factory_; | 114 base::WeakPtrFactory<CALayerStorageProvider> pending_draw_weak_factory_; |
| 113 | 115 |
| 114 DISALLOW_COPY_AND_ASSIGN(CALayerStorageProvider); | 116 DISALLOW_COPY_AND_ASSIGN(CALayerStorageProvider); |
| 115 }; | 117 }; |
| 116 | 118 |
| 117 } // namespace content | 119 } // namespace content |
| 118 | 120 |
| 119 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_ | 121 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_ |
| OLD | NEW |