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

Side by Side Diff: ui/ozone/platform/dri/overlay_plane.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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
« no previous file with comments | « ui/ozone/platform/dri/overlay_plane.h ('k') | ui/ozone/platform/dri/ozone_platform_dri.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/ozone/platform/dri/overlay_plane.h"
6
7 #include "base/logging.h"
8 #include "ui/ozone/platform/dri/scanout_buffer.h"
9
10 namespace ui {
11
12 OverlayPlane::OverlayPlane(scoped_refptr<ScanoutBuffer> buffer)
13 : buffer(buffer),
14 z_order(0),
15 display_bounds(gfx::Point(), buffer->GetSize()),
16 crop_rect(0, 0, 1, 1),
17 overlay_plane(0) {
18 }
19
20 OverlayPlane::OverlayPlane(scoped_refptr<ScanoutBuffer> buffer,
21 int z_order,
22 gfx::OverlayTransform plane_transform,
23 const gfx::Rect& display_bounds,
24 const gfx::RectF& crop_rect)
25 : buffer(buffer),
26 z_order(z_order),
27 plane_transform(plane_transform),
28 display_bounds(display_bounds),
29 crop_rect(crop_rect),
30 overlay_plane(0) {
31 }
32
33 OverlayPlane::~OverlayPlane() {
34 }
35
36 // static
37 const OverlayPlane& OverlayPlane::GetPrimaryPlane(
38 const OverlayPlaneList& overlays) {
39 for (size_t i = 0; i < overlays.size(); ++i) {
40 if (overlays[i].z_order == 0)
41 return overlays[i];
42 }
43
44 NOTREACHED();
45 return overlays[0];
46 }
47
48 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/overlay_plane.h ('k') | ui/ozone/platform/dri/ozone_platform_dri.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698