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

Side by Side Diff: ui/ozone/platform/dri/dri_buffer.h

Issue 959953002: [Ozone-Dri] Do not call AddFramebuffer with cursor buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | ui/ozone/platform/dri/dri_buffer.cc » ('j') | ui/ozone/platform/dri/dri_buffer.cc » ('J')
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_DRI_DRI_BUFFER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_BUFFER_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_BUFFER_H_ 6 #define UI_OZONE_PLATFORM_DRI_DRI_BUFFER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "skia/ext/refptr.h" 9 #include "skia/ext/refptr.h"
10 #include "third_party/skia/include/core/SkSurface.h" 10 #include "third_party/skia/include/core/SkSurface.h"
11 #include "ui/ozone/ozone_export.h" 11 #include "ui/ozone/ozone_export.h"
12 #include "ui/ozone/platform/dri/scanout_buffer.h" 12 #include "ui/ozone/platform/dri/scanout_buffer.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 class DriWrapper; 16 class DriWrapper;
17 17
18 // Wrapper for a DRM allocated buffer. Keeps track of the native properties of 18 // Wrapper for a DRM allocated buffer. Keeps track of the native properties of
19 // the buffer and wraps the pixel memory into a SkSurface which can be used to 19 // the buffer and wraps the pixel memory into a SkSurface which can be used to
20 // draw into using Skia. 20 // draw into using Skia.
21 class OZONE_EXPORT DriBuffer : public ScanoutBuffer { 21 class OZONE_EXPORT DriBuffer : public ScanoutBuffer {
22 public: 22 public:
23 DriBuffer(const scoped_refptr<DriWrapper>& dri); 23 DriBuffer(const scoped_refptr<DriWrapper>& dri);
24 24
25 // Allocates the backing pixels and wraps them in |surface_|. |info| is used 25 // Allocates the backing pixels and wraps them in |surface_|. |info| is used
26 // to describe the buffer characteristics (size, color format). 26 // to describe the buffer characteristics (size, color format). |is_scanout|
27 bool Initialize(const SkImageInfo& info); 27 // is used to distinguish the buffers that are used for modesetting.
28 bool Initialize(const SkImageInfo& info, bool is_scanout);
28 29
29 SkCanvas* GetCanvas() const; 30 SkCanvas* GetCanvas() const;
30 31
31 // ScanoutBuffer: 32 // ScanoutBuffer:
32 uint32_t GetFramebufferId() const override; 33 uint32_t GetFramebufferId() const override;
33 uint32_t GetHandle() const override; 34 uint32_t GetHandle() const override;
34 gfx::Size GetSize() const override; 35 gfx::Size GetSize() const override;
35 36
36 protected: 37 protected:
37 ~DriBuffer() override; 38 ~DriBuffer() override;
(...skipping 25 matching lines...) Expand all
63 scoped_refptr<ScanoutBuffer> Create(const scoped_refptr<DriWrapper>& drm, 64 scoped_refptr<ScanoutBuffer> Create(const scoped_refptr<DriWrapper>& drm,
64 const gfx::Size& size) override; 65 const gfx::Size& size) override;
65 66
66 private: 67 private:
67 DISALLOW_COPY_AND_ASSIGN(DriBufferGenerator); 68 DISALLOW_COPY_AND_ASSIGN(DriBufferGenerator);
68 }; 69 };
69 70
70 } // namespace ui 71 } // namespace ui
71 72
72 #endif // UI_OZONE_PLATFORM_DRI_DRI_BUFFER_H_ 73 #endif // UI_OZONE_PLATFORM_DRI_DRI_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/dri/dri_buffer.cc » ('j') | ui/ozone/platform/dri/dri_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698