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

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

Issue 2951193002: 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;
35 const DrmDevice* GetDrmDevice() const override; 36 const DrmDevice* GetDrmDevice() const override;
36 bool RequiresGlFinish() const override; 37 bool RequiresGlFinish() const override;
37 38
38 protected: 39 protected:
39 GbmBufferBase(const scoped_refptr<GbmDevice>& drm, 40 GbmBufferBase(const scoped_refptr<GbmDevice>& drm,
40 gbm_bo* bo, 41 gbm_bo* bo,
41 uint32_t format, 42 uint32_t format,
42 uint32_t flags, 43 uint32_t flags,
43 uint64_t modifier, 44 uint64_t modifier,
44 uint32_t addfb_flags); 45 uint32_t addfb_flags);
45 ~GbmBufferBase() override; 46 ~GbmBufferBase() override;
46 47
47 private: 48 private:
48 scoped_refptr<GbmDevice> drm_; 49 scoped_refptr<GbmDevice> drm_;
49 gbm_bo* bo_; 50 gbm_bo* bo_;
50 uint32_t framebuffer_ = 0; 51 uint32_t framebuffer_ = 0;
51 uint32_t framebuffer_pixel_format_ = 0; 52 uint32_t framebuffer_pixel_format_ = 0;
52 // If |opaque_framebuffer_pixel_format_| differs from 53 // If |opaque_framebuffer_pixel_format_| differs from
53 // |framebuffer_pixel_format_| the following member is set to a valid fb, 54 // |framebuffer_pixel_format_| the following member is set to a valid fb,
54 // otherwise it is set to 0. 55 // otherwise it is set to 0.
55 uint32_t opaque_framebuffer_ = 0; 56 uint32_t opaque_framebuffer_ = 0;
56 uint32_t opaque_framebuffer_pixel_format_ = 0; 57 uint32_t opaque_framebuffer_pixel_format_ = 0;
58 uint64_t format_modifier_ = 0;
57 59
58 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase); 60 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase);
59 }; 61 };
60 62
61 } // namespace ui 63 } // namespace ui
62 64
63 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ 65 #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