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

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

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: cosmetic fixes Created 5 years, 1 month 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/crtc_controller.h" 5 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/time.h" 8 #include "base/time/time.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/page_flip_request.h" 10 #include "ui/ozone/platform/drm/gpu/page_flip_request.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 return true; 114 return true;
115 } 115 }
116 116
117 std::vector<uint32_t> CrtcController::GetCompatibleHardwarePlaneIds( 117 std::vector<uint32_t> CrtcController::GetCompatibleHardwarePlaneIds(
118 const OverlayPlane& plane) const { 118 const OverlayPlane& plane) const {
119 return drm_->plane_manager()->GetCompatibleHardwarePlaneIds(plane, crtc_); 119 return drm_->plane_manager()->GetCompatibleHardwarePlaneIds(plane, crtc_);
120 } 120 }
121 121
122 bool CrtcController::IsFormatSupported(uint32_t fourcc_format,
123 uint32_t z_order) const {
124 return drm_->plane_manager()->IsFormatSupported(fourcc_format, z_order,
125 crtc_);
126 }
127
122 void CrtcController::OnPageFlipEvent(unsigned int frame, 128 void CrtcController::OnPageFlipEvent(unsigned int frame,
123 unsigned int seconds, 129 unsigned int seconds,
124 unsigned int useconds) { 130 unsigned int useconds) {
125 time_of_last_flip_ = 131 time_of_last_flip_ =
126 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond + 132 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond +
127 useconds; 133 useconds;
128 134
129 SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK); 135 SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK);
130 } 136 }
131 137
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 current_planes_.swap(pending_planes_); 171 current_planes_.swap(pending_planes_);
166 172
167 pending_planes_.clear(); 173 pending_planes_.clear();
168 174
169 scoped_refptr<PageFlipRequest> request; 175 scoped_refptr<PageFlipRequest> request;
170 request.swap(page_flip_request_); 176 request.swap(page_flip_request_);
171 request->Signal(result); 177 request->Signal(result);
172 } 178 }
173 179
174 } // namespace ui 180 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698