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

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

Issue 1426993003: Ozone: Dont hardcode format to YUV when using Overlay Composition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete code Created 4 years, 11 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_DRM_GPU_GBM_BUFFER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_
7 7
8 #include "base/files/scoped_file.h" 8 #include "base/files/scoped_file.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/gfx/buffer_types.h" 10 #include "ui/gfx/buffer_types.h"
11 #include "ui/gfx/geometry/size.h" 11 #include "ui/gfx/geometry/size.h"
12 #include "ui/ozone/platform/drm/gpu/gbm_buffer_base.h" 12 #include "ui/ozone/platform/drm/gpu/gbm_buffer_base.h"
13 #include "ui/ozone/platform/drm/gpu/overlay_plane.h"
13 #include "ui/ozone/public/native_pixmap.h" 14 #include "ui/ozone/public/native_pixmap.h"
14 15
15 struct gbm_bo; 16 struct gbm_bo;
16 17
17 namespace ui { 18 namespace ui {
18 19
19 class GbmDevice; 20 class GbmDevice;
20 class GbmSurfaceFactory; 21 class GbmSurfaceFactory;
21 22
22 class GbmBuffer : public GbmBufferBase { 23 class GbmBuffer : public GbmBufferBase {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 int plane_z_order, 64 int plane_z_order,
64 gfx::OverlayTransform plane_transform, 65 gfx::OverlayTransform plane_transform,
65 const gfx::Rect& display_bounds, 66 const gfx::Rect& display_bounds,
66 const gfx::RectF& crop_rect) override; 67 const gfx::RectF& crop_rect) override;
67 gfx::NativePixmapHandle ExportHandle() override; 68 gfx::NativePixmapHandle ExportHandle() override;
68 69
69 scoped_refptr<GbmBuffer> buffer() { return buffer_; } 70 scoped_refptr<GbmBuffer> buffer() { return buffer_; }
70 71
71 private: 72 private:
72 ~GbmPixmap() override; 73 ~GbmPixmap() override;
73 bool ShouldApplyProcessing(const gfx::Rect& display_bounds, 74 bool CopyBuffer(const scoped_refptr<ScanoutBuffer>& source_buffer,
74 const gfx::RectF& crop_rect, 75 scoped_refptr<ScanoutBuffer>& target_buffer);
75 gfx::Size* target_size,
76 gfx::BufferFormat* target_format);
77 76
78 scoped_refptr<GbmBuffer> buffer_; 77 scoped_refptr<GbmBuffer> buffer_;
79 base::ScopedFD dma_buf_; 78 base::ScopedFD dma_buf_;
80 int dma_buf_pitch_ = -1; 79 int dma_buf_pitch_ = -1;
81 80
82 GbmSurfaceFactory* surface_manager_; 81 GbmSurfaceFactory* surface_manager_;
83 82
84 ProcessingCallback processing_callback_; 83 ProcessingCallback processing_callback_;
84 OverlayPlane::CopyBufferCallback copy_buffer_handler_;
85 85
86 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); 86 DISALLOW_COPY_AND_ASSIGN(GbmPixmap);
87 }; 87 };
88 88
89 } // namespace ui 89 } // namespace ui
90 90
91 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ 91 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698