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

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: renamed param Created 5 years, 10 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 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).
27 bool Initialize(const SkImageInfo& info); 27 // |should_register_framebuffer|is used to distinguish the buffers that are
28 // used for modesetting.
29 bool Initialize(const SkImageInfo& info, bool should_register_framebuffer);
28 30
29 SkCanvas* GetCanvas() const; 31 SkCanvas* GetCanvas() const;
30 32
31 // ScanoutBuffer: 33 // ScanoutBuffer:
32 uint32_t GetFramebufferId() const override; 34 uint32_t GetFramebufferId() const override;
33 uint32_t GetHandle() const override; 35 uint32_t GetHandle() const override;
34 gfx::Size GetSize() const override; 36 gfx::Size GetSize() const override;
35 37
36 protected: 38 protected:
37 ~DriBuffer() override; 39 ~DriBuffer() override;
(...skipping 25 matching lines...) Expand all
63 scoped_refptr<ScanoutBuffer> Create(const scoped_refptr<DriWrapper>& drm, 65 scoped_refptr<ScanoutBuffer> Create(const scoped_refptr<DriWrapper>& drm,
64 const gfx::Size& size) override; 66 const gfx::Size& size) override;
65 67
66 private: 68 private:
67 DISALLOW_COPY_AND_ASSIGN(DriBufferGenerator); 69 DISALLOW_COPY_AND_ASSIGN(DriBufferGenerator);
68 }; 70 };
69 71
70 } // namespace ui 72 } // namespace ui
71 73
72 #endif // UI_OZONE_PLATFORM_DRI_DRI_BUFFER_H_ 74 #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_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698