| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_ |
| 7 | 7 |
| 8 #include <drm_fourcc.h> | 8 #include <drm_fourcc.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" | 12 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 class MockScanoutBuffer : public ScanoutBuffer { | 16 class MockScanoutBuffer : public ScanoutBuffer { |
| 17 public: | 17 public: |
| 18 MockScanoutBuffer(const gfx::Size& size, | 18 MockScanoutBuffer(const gfx::Size& size, |
| 19 uint32_t format = DRM_FORMAT_XRGB8888); | 19 uint32_t format = DRM_FORMAT_XRGB8888); |
| 20 | 20 |
| 21 // ScanoutBuffer: | 21 // ScanoutBuffer: |
| 22 uint32_t GetFramebufferId() const override; | 22 uint32_t GetFramebufferId() const override; |
| 23 uint32_t GetOpaqueFramebufferId() const override; |
| 23 uint32_t GetHandle() const override; | 24 uint32_t GetHandle() const override; |
| 24 gfx::Size GetSize() const override; | 25 gfx::Size GetSize() const override; |
| 25 uint32_t GetFramebufferPixelFormat() const override; | 26 uint32_t GetFramebufferPixelFormat() const override; |
| 27 uint32_t GetOpaqueFramebufferPixelFormat() const override; |
| 26 const DrmDevice* GetDrmDevice() const override; | 28 const DrmDevice* GetDrmDevice() const override; |
| 27 bool RequiresGlFinish() const override; | 29 bool RequiresGlFinish() const override; |
| 28 | 30 |
| 29 private: | 31 private: |
| 30 ~MockScanoutBuffer() override; | 32 ~MockScanoutBuffer() override; |
| 31 | 33 |
| 32 gfx::Size size_; | 34 gfx::Size size_; |
| 33 uint32_t format_; | 35 uint32_t format_; |
| 34 | 36 |
| 35 DISALLOW_COPY_AND_ASSIGN(MockScanoutBuffer); | 37 DISALLOW_COPY_AND_ASSIGN(MockScanoutBuffer); |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 } // namespace ui | 40 } // namespace ui |
| 39 | 41 |
| 40 #endif // UI_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_ | 42 #endif // UI_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_ |
| OLD | NEW |