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

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

Issue 1339993002: Quit loop once type property is found (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane.h"
6 6
7 #include <drm_fourcc.h> 7 #include <drm_fourcc.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/ozone/platform/drm/gpu/drm_device.h" 10 #include "ui/ozone/platform/drm/gpu/drm_device.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 PLOG(ERROR) << "Unable to get plane properties."; 75 PLOG(ERROR) << "Unable to get plane properties.";
76 return false; 76 return false;
77 } 77 }
78 78
79 uint32_t count_props = plane_props->count_props; 79 uint32_t count_props = plane_props->count_props;
80 for (uint32_t i = 0; i < count_props; i++) { 80 for (uint32_t i = 0; i < count_props; i++) {
81 ScopedDrmPropertyPtr property( 81 ScopedDrmPropertyPtr property(
82 drmModeGetProperty(drm->get_fd(), plane_props->props[i])); 82 drmModeGetProperty(drm->get_fd(), plane_props->props[i]));
83 if (property && !strcmp(property->name, kTypePropName)) { 83 if (property && !strcmp(property->name, kTypePropName)) {
84 type_ = GetPlaneType(plane_props->prop_values[i]); 84 type_ = GetPlaneType(plane_props->prop_values[i]);
85 break;
85 } 86 }
86 } 87 }
87 88
88 return InitializeProperties(drm, plane_props); 89 return InitializeProperties(drm, plane_props);
89 } 90 }
90 91
91 bool HardwareDisplayPlane::IsSupportedFormat(uint32_t format) { 92 bool HardwareDisplayPlane::IsSupportedFormat(uint32_t format) {
92 if (!format) 93 if (!format)
93 return false; 94 return false;
94 95
(...skipping 11 matching lines...) Expand all
106 return false; 107 return false;
107 } 108 }
108 109
109 bool HardwareDisplayPlane::InitializeProperties( 110 bool HardwareDisplayPlane::InitializeProperties(
110 DrmDevice* drm, 111 DrmDevice* drm,
111 const ScopedDrmObjectPropertyPtr& plane_props) { 112 const ScopedDrmObjectPropertyPtr& plane_props) {
112 return true; 113 return true;
113 } 114 }
114 115
115 } // namespace ui 116 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698