| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void DidModifyTexImage() override {} | 43 void DidModifyTexImage() override {} |
| 44 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 44 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 45 int z_order, | 45 int z_order, |
| 46 OverlayTransform transform, | 46 OverlayTransform transform, |
| 47 const Rect& bounds_rect, | 47 const Rect& bounds_rect, |
| 48 const RectF& crop_rect) override; | 48 const RectF& crop_rect) override; |
| 49 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 49 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 50 uint64_t process_tracing_id, | 50 uint64_t process_tracing_id, |
| 51 const std::string& dump_name) override; | 51 const std::string& dump_name) override; |
| 52 | 52 |
| 53 gfx::GenericSharedMemoryId io_surface_id() const { return io_surface_id_; } |
| 53 base::ScopedCFTypeRef<IOSurfaceRef> io_surface(); | 54 base::ScopedCFTypeRef<IOSurfaceRef> io_surface(); |
| 54 | 55 |
| 55 static void SetLayerForWidget(gfx::AcceleratedWidget widget, | 56 static void SetLayerForWidget(gfx::AcceleratedWidget widget, |
| 56 CALayer* layer); | 57 CALayer* layer); |
| 57 | 58 |
| 58 protected: | 59 protected: |
| 59 ~GLImageIOSurface() override; | 60 ~GLImageIOSurface() override; |
| 60 | 61 |
| 61 private: | 62 private: |
| 62 const gfx::Size size_; | 63 const gfx::Size size_; |
| 63 const unsigned internalformat_; | 64 const unsigned internalformat_; |
| 64 BufferFormat format_; | 65 BufferFormat format_; |
| 65 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; | 66 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; |
| 66 gfx::GenericSharedMemoryId io_surface_id_; | 67 gfx::GenericSharedMemoryId io_surface_id_; |
| 67 base::ThreadChecker thread_checker_; | 68 base::ThreadChecker thread_checker_; |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); | 70 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace gfx | 73 } // namespace gfx |
| 73 | 74 |
| 74 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ | 75 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| OLD | NEW |