Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: ui/ozone/platform/drm/gpu/mock_scanout_buffer.h

Issue 2948513003: Revert of ozone/drm: Only reuse ScanoutBuffers with compatible modifiers (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 uint64_t modifier = DRM_FORMAT_MOD_NONE,
21 const scoped_refptr<DrmDevice>& drm = nullptr);
22 20
23 // ScanoutBuffer: 21 // ScanoutBuffer:
24 uint32_t GetFramebufferId() const override; 22 uint32_t GetFramebufferId() const override;
25 uint32_t GetOpaqueFramebufferId() const override; 23 uint32_t GetOpaqueFramebufferId() const override;
26 uint32_t GetHandle() const override; 24 uint32_t GetHandle() const override;
27 gfx::Size GetSize() const override; 25 gfx::Size GetSize() const override;
28 uint32_t GetFramebufferPixelFormat() const override; 26 uint32_t GetFramebufferPixelFormat() const override;
29 uint32_t GetOpaqueFramebufferPixelFormat() const override; 27 uint32_t GetOpaqueFramebufferPixelFormat() const override;
30 uint64_t GetFormatModifier() const override;
31 const DrmDevice* GetDrmDevice() const override; 28 const DrmDevice* GetDrmDevice() const override;
32 bool RequiresGlFinish() const override; 29 bool RequiresGlFinish() const override;
33 30
34 private: 31 private:
35 ~MockScanoutBuffer() override; 32 ~MockScanoutBuffer() override;
36 33
37 gfx::Size size_; 34 gfx::Size size_;
38 uint32_t format_; 35 uint32_t format_;
39 uint64_t modifier_;
40 uint32_t id_;
41 scoped_refptr<DrmDevice> drm_;
42 36
43 DISALLOW_COPY_AND_ASSIGN(MockScanoutBuffer); 37 DISALLOW_COPY_AND_ASSIGN(MockScanoutBuffer);
44 }; 38 };
45 39
46 } // namespace ui 40 } // namespace ui
47 41
48 #endif // UI_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_ 42 #endif // UI_OZONE_PLATFORM_DRM_GPU_MOCK_SCANOUT_BUFFER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.cc ('k') | ui/ozone/platform/drm/gpu/mock_scanout_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698