OLD | NEW |
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/dri/overlay_plane.h" | 5 #include "ui/ozone/platform/dri/overlay_plane.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/ozone/platform/dri/scanout_buffer.h" | 8 #include "ui/ozone/platform/dri/scanout_buffer.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
(...skipping 14 matching lines...) Expand all Loading... |
25 z_order(z_order), | 25 z_order(z_order), |
26 plane_transform(plane_transform), | 26 plane_transform(plane_transform), |
27 display_bounds(display_bounds), | 27 display_bounds(display_bounds), |
28 crop_rect(crop_rect) { | 28 crop_rect(crop_rect) { |
29 } | 29 } |
30 | 30 |
31 OverlayPlane::~OverlayPlane() { | 31 OverlayPlane::~OverlayPlane() { |
32 } | 32 } |
33 | 33 |
34 // static | 34 // static |
35 const OverlayPlane& OverlayPlane::GetPrimaryPlane( | 35 const OverlayPlane* OverlayPlane::GetPrimaryPlane( |
36 const OverlayPlaneList& overlays) { | 36 const OverlayPlaneList& overlays) { |
37 for (size_t i = 0; i < overlays.size(); ++i) { | 37 for (size_t i = 0; i < overlays.size(); ++i) { |
38 if (overlays[i].z_order == 0) | 38 if (overlays[i].z_order == 0) |
39 return overlays[i]; | 39 return &overlays[i]; |
40 } | 40 } |
41 | 41 |
42 NOTREACHED(); | 42 return nullptr; |
43 return overlays[0]; | |
44 } | 43 } |
45 | 44 |
46 } // namespace ui | 45 } // namespace ui |
OLD | NEW |