| 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 <CoreVideo/CVPixelBuffer.h> | 8 #include <CoreVideo/CVPixelBuffer.h> |
| 9 #include <IOSurface/IOSurface.h> | 9 #include <IOSurface/IOSurface.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 55 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 56 int z_order, | 56 int z_order, |
| 57 gfx::OverlayTransform transform, | 57 gfx::OverlayTransform transform, |
| 58 const gfx::Rect& bounds_rect, | 58 const gfx::Rect& bounds_rect, |
| 59 const gfx::RectF& crop_rect) override; | 59 const gfx::RectF& crop_rect) override; |
| 60 void Flush() override {} | 60 void Flush() override {} |
| 61 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 61 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 62 uint64_t process_tracing_id, | 62 uint64_t process_tracing_id, |
| 63 const std::string& dump_name) override; | 63 const std::string& dump_name) override; |
| 64 bool EmulatingRGB() const override; | 64 bool EmulatingRGB() const override; |
| 65 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) override; |
| 65 | 66 |
| 66 gfx::GenericSharedMemoryId io_surface_id() const { return io_surface_id_; } | 67 gfx::GenericSharedMemoryId io_surface_id() const { return io_surface_id_; } |
| 67 base::ScopedCFTypeRef<IOSurfaceRef> io_surface(); | 68 base::ScopedCFTypeRef<IOSurfaceRef> io_surface(); |
| 68 base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer(); | 69 base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer(); |
| 69 | 70 |
| 70 // Whether checking IOSurfaceIsInUse() will actually provide a meaningful | 71 // Whether checking IOSurfaceIsInUse() will actually provide a meaningful |
| 71 // signal about whether the Window Server is still using the IOSurface. | 72 // signal about whether the Window Server is still using the IOSurface. |
| 72 bool CanCheckIOSurfaceIsInUse() const; | 73 bool CanCheckIOSurfaceIsInUse() const; |
| 73 | 74 |
| 74 static unsigned GetInternalFormatForTesting(gfx::BufferFormat format); | 75 static unsigned GetInternalFormatForTesting(gfx::BufferFormat format); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 97 base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer_; | 98 base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer_; |
| 98 gfx::GenericSharedMemoryId io_surface_id_; | 99 gfx::GenericSharedMemoryId io_surface_id_; |
| 99 base::ThreadChecker thread_checker_; | 100 base::ThreadChecker thread_checker_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); | 102 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace gl | 105 } // namespace gl |
| 105 | 106 |
| 106 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ | 107 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| OLD | NEW |