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

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

Issue 1780013002: Fix black screen when switching primary display without bounds change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build failure in MockScanoutBuffer (again! sorry) Created 4 years, 7 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/drm_window.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 12 matching lines...) Expand all
23 class GbmBufferBase : public ScanoutBuffer { 23 class GbmBufferBase : public ScanoutBuffer {
24 public: 24 public:
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 GetHandle() const override; 30 uint32_t GetHandle() const override;
31 gfx::Size GetSize() const override; 31 gfx::Size GetSize() const override;
32 uint32_t GetFramebufferPixelFormat() const override; 32 uint32_t GetFramebufferPixelFormat() const override;
33 const DrmDevice* GetDrmDevice() const override;
33 bool RequiresGlFinish() const override; 34 bool RequiresGlFinish() const override;
34 35
35 protected: 36 protected:
36 GbmBufferBase(const scoped_refptr<GbmDevice>& drm, 37 GbmBufferBase(const scoped_refptr<GbmDevice>& drm,
37 gbm_bo* bo, 38 gbm_bo* bo,
38 gfx::BufferFormat format, 39 gfx::BufferFormat format,
39 gfx::BufferUsage usage); 40 gfx::BufferUsage usage);
40 ~GbmBufferBase() override; 41 ~GbmBufferBase() override;
41 42
42 private: 43 private:
43 scoped_refptr<GbmDevice> drm_; 44 scoped_refptr<GbmDevice> drm_;
44 gbm_bo* bo_; 45 gbm_bo* bo_;
45 uint32_t framebuffer_ = 0; 46 uint32_t framebuffer_ = 0;
46 uint32_t framebuffer_pixel_format_ = 0; 47 uint32_t framebuffer_pixel_format_ = 0;
47 48
48 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase); 49 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase);
49 }; 50 };
50 51
51 } // namespace ui 52 } // namespace ui
52 53
53 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ 54 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.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