| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 UI_GL_GL_IMAGE_IO_SURFACE_H_ | 5 #ifndef UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| 6 #define UI_GL_GL_IMAGE_IO_SURFACE_H_ | 6 #define UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| 7 | 7 |
| 8 #include <IOSurface/IOSurface.h> | 8 #include <IOSurface/IOSurface.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const Rect& rect) override; | 41 const Rect& rect) override; |
| 42 bool ScheduleOverlayPlane(AcceleratedWidget widget, | 42 bool ScheduleOverlayPlane(AcceleratedWidget widget, |
| 43 int z_order, | 43 int z_order, |
| 44 OverlayTransform transform, | 44 OverlayTransform transform, |
| 45 const Rect& bounds_rect, | 45 const Rect& bounds_rect, |
| 46 const RectF& crop_rect) override; | 46 const RectF& crop_rect) override; |
| 47 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 47 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 48 uint64_t process_tracing_id, | 48 uint64_t process_tracing_id, |
| 49 const std::string& dump_name) override; | 49 const std::string& dump_name) override; |
| 50 | 50 |
| 51 gfx::GenericSharedMemoryId io_surface_id() const { return io_surface_id_; } |
| 51 base::ScopedCFTypeRef<IOSurfaceRef> io_surface(); | 52 base::ScopedCFTypeRef<IOSurfaceRef> io_surface(); |
| 52 | 53 |
| 53 static void SetLayerForWidget(AcceleratedWidget widget, CALayer* layer); | 54 static void SetLayerForWidget(AcceleratedWidget widget, CALayer* layer); |
| 54 | 55 |
| 55 protected: | 56 protected: |
| 56 ~GLImageIOSurface() override; | 57 ~GLImageIOSurface() override; |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 const Size size_; | 60 const Size size_; |
| 60 const unsigned internalformat_; | 61 const unsigned internalformat_; |
| 61 BufferFormat format_; | 62 BufferFormat format_; |
| 62 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; | 63 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; |
| 63 GenericSharedMemoryId io_surface_id_; | 64 GenericSharedMemoryId io_surface_id_; |
| 64 base::ThreadChecker thread_checker_; | 65 base::ThreadChecker thread_checker_; |
| 65 | 66 |
| 66 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); | 67 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 } // namespace gfx | 70 } // namespace gfx |
| 70 | 71 |
| 71 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ | 72 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| OLD | NEW |