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

Side by Side Diff: ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc

Issue 2743403005: ozone: Add an opaque fb to ScanoutBuffer for primary planes. (Closed)
Patch Set: Replace PrimaryPlane with Opaque. Created 3 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
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 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h" 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" 8 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
9 #include "ui/ozone/platform/drm/gpu/drm_device.h" 9 #include "ui/ozone/platform/drm/gpu/drm_device.h"
10 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h" 10 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 bool HardwareDisplayPlaneManagerAtomic::SetPlaneData( 89 bool HardwareDisplayPlaneManagerAtomic::SetPlaneData(
90 HardwareDisplayPlaneList* plane_list, 90 HardwareDisplayPlaneList* plane_list,
91 HardwareDisplayPlane* hw_plane, 91 HardwareDisplayPlane* hw_plane,
92 const OverlayPlane& overlay, 92 const OverlayPlane& overlay,
93 uint32_t crtc_id, 93 uint32_t crtc_id,
94 const gfx::Rect& src_rect, 94 const gfx::Rect& src_rect,
95 CrtcController* crtc) { 95 CrtcController* crtc) {
96 HardwareDisplayPlaneAtomic* atomic_plane = 96 HardwareDisplayPlaneAtomic* atomic_plane =
97 static_cast<HardwareDisplayPlaneAtomic*>(hw_plane); 97 static_cast<HardwareDisplayPlaneAtomic*>(hw_plane);
98 uint32_t framebuffer_id = overlay.z_order
99 ? overlay.buffer->GetFramebufferId()
100 : overlay.buffer->GetOpaqueFramebufferId();
98 if (!atomic_plane->SetPlaneData(plane_list->atomic_property_set.get(), 101 if (!atomic_plane->SetPlaneData(plane_list->atomic_property_set.get(),
99 crtc_id, overlay.buffer->GetFramebufferId(), 102 crtc_id, framebuffer_id,
100 overlay.display_bounds, src_rect)) { 103 overlay.display_bounds, src_rect)) {
101 LOG(ERROR) << "Failed to set plane properties"; 104 LOG(ERROR) << "Failed to set plane properties";
102 return false; 105 return false;
103 } 106 }
104 atomic_plane->set_crtc(crtc); 107 atomic_plane->set_crtc(crtc);
105 return true; 108 return true;
106 } 109 }
107 110
108 std::unique_ptr<HardwareDisplayPlane> 111 std::unique_ptr<HardwareDisplayPlane>
109 HardwareDisplayPlaneManagerAtomic::CreatePlane(uint32_t plane_id, 112 HardwareDisplayPlaneManagerAtomic::CreatePlane(uint32_t plane_id,
110 uint32_t possible_crtcs) { 113 uint32_t possible_crtcs) {
111 return std::unique_ptr<HardwareDisplayPlane>( 114 return std::unique_ptr<HardwareDisplayPlane>(
112 new HardwareDisplayPlaneAtomic(plane_id, possible_crtcs)); 115 new HardwareDisplayPlaneAtomic(plane_id, possible_crtcs));
113 } 116 }
114 117
115 } // namespace ui 118 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer_base.cc ('k') | ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698