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

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: Review fixes 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"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 int plane_z_order, 63 int plane_z_order,
64 gfx::OverlayTransform plane_transform, 64 gfx::OverlayTransform plane_transform,
65 const gfx::Rect& display_bounds, 65 const gfx::Rect& display_bounds,
66 const gfx::RectF& crop_rect) override; 66 const gfx::RectF& crop_rect) override;
67 gfx::NativePixmapHandle ExportHandle() override; 67 gfx::NativePixmapHandle ExportHandle() override;
68 68
69 scoped_refptr<GbmBuffer> buffer() { return buffer_; } 69 scoped_refptr<GbmBuffer> buffer() { return buffer_; }
70 70
71 private: 71 private:
72 ~GbmPixmap() override; 72 ~GbmPixmap() override;
73 bool ShouldApplyProcessing(const gfx::Rect& display_bounds, 73 scoped_refptr<ScanoutBuffer> ProcessBuffer(const gfx::Size& size,
74 const gfx::RectF& crop_rect, 74 uint32_t format);
75 gfx::Size* target_size,
76 gfx::BufferFormat* target_format);
77 75
78 scoped_refptr<GbmBuffer> buffer_; 76 scoped_refptr<GbmBuffer> buffer_;
79 base::ScopedFD dma_buf_; 77 base::ScopedFD dma_buf_;
80 int dma_buf_pitch_ = -1; 78 int dma_buf_pitch_ = -1;
81 79
82 GbmSurfaceFactory* surface_manager_; 80 GbmSurfaceFactory* surface_manager_;
83 81
82 // OverlayValidator can request scaling or format conversions as needed for
83 // this Pixmap. This holds the processed buffer.
84 scoped_refptr<GbmPixmap> processed_pixmap_;
84 ProcessingCallback processing_callback_; 85 ProcessingCallback processing_callback_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); 87 DISALLOW_COPY_AND_ASSIGN(GbmPixmap);
87 }; 88 };
88 89
89 } // namespace ui 90 } // namespace ui
90 91
91 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ 92 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window_unittest.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698