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

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_buffer_base.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
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_GBM_BUFFER_BASE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 gbm_bo* bo() const { return bo_; } 25 gbm_bo* bo() const { return bo_; }
26 const scoped_refptr<GbmDevice>& drm() const { return drm_; } 26 const scoped_refptr<GbmDevice>& drm() const { return drm_; }
27 27
28 // ScanoutBuffer: 28 // ScanoutBuffer:
29 uint32_t GetFramebufferId() const override; 29 uint32_t GetFramebufferId() const override;
30 uint32_t GetOpaqueFramebufferId() const override; 30 uint32_t GetOpaqueFramebufferId() const override;
31 uint32_t GetHandle() const override; 31 uint32_t GetHandle() const override;
32 gfx::Size GetSize() const override; 32 gfx::Size GetSize() const override;
33 uint32_t GetFramebufferPixelFormat() const override; 33 uint32_t GetFramebufferPixelFormat() const override;
34 uint32_t GetOpaqueFramebufferPixelFormat() const override; 34 uint32_t GetOpaqueFramebufferPixelFormat() const override;
35 uint64_t GetFormatModifier() const override;
36 const DrmDevice* GetDrmDevice() const override; 35 const DrmDevice* GetDrmDevice() const override;
37 bool RequiresGlFinish() const override; 36 bool RequiresGlFinish() const override;
38 37
39 protected: 38 protected:
40 GbmBufferBase(const scoped_refptr<GbmDevice>& drm, 39 GbmBufferBase(const scoped_refptr<GbmDevice>& drm,
41 gbm_bo* bo, 40 gbm_bo* bo,
42 uint32_t format, 41 uint32_t format,
43 uint32_t flags, 42 uint32_t flags,
44 uint64_t modifier, 43 uint64_t modifier,
45 uint32_t addfb_flags); 44 uint32_t addfb_flags);
46 ~GbmBufferBase() override; 45 ~GbmBufferBase() override;
47 46
48 private: 47 private:
49 scoped_refptr<GbmDevice> drm_; 48 scoped_refptr<GbmDevice> drm_;
50 gbm_bo* bo_; 49 gbm_bo* bo_;
51 uint32_t framebuffer_ = 0; 50 uint32_t framebuffer_ = 0;
52 uint32_t framebuffer_pixel_format_ = 0; 51 uint32_t framebuffer_pixel_format_ = 0;
53 // If |opaque_framebuffer_pixel_format_| differs from 52 // If |opaque_framebuffer_pixel_format_| differs from
54 // |framebuffer_pixel_format_| the following member is set to a valid fb, 53 // |framebuffer_pixel_format_| the following member is set to a valid fb,
55 // otherwise it is set to 0. 54 // otherwise it is set to 0.
56 uint32_t opaque_framebuffer_ = 0; 55 uint32_t opaque_framebuffer_ = 0;
57 uint32_t opaque_framebuffer_pixel_format_ = 0; 56 uint32_t opaque_framebuffer_pixel_format_ = 0;
58 uint64_t format_modifier_ = 0;
59 57
60 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase); 58 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase);
61 }; 59 };
62 60
63 } // namespace ui 61 } // namespace ui
64 62
65 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ 63 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698