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

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

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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
(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/drm/gpu/overlay_plane.h"
6
7 #include "base/logging.h"
8 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h"
9
10 namespace ui {
11
12 OverlayPlane::OverlayPlane(scoped_refptr<ScanoutBuffer> buffer)
13 : buffer(buffer),
14 display_bounds(gfx::Point(), buffer->GetSize()),
15 crop_rect(0, 0, 1, 1) {
16 }
17
18 OverlayPlane::OverlayPlane(scoped_refptr<ScanoutBuffer> buffer,
19 int z_order,
20 gfx::OverlayTransform plane_transform,
21 const gfx::Rect& display_bounds,
22 const gfx::RectF& crop_rect)
23 : buffer(buffer),
24 z_order(z_order),
25 plane_transform(plane_transform),
26 display_bounds(display_bounds),
27 crop_rect(crop_rect) {
28 }
29
30 OverlayPlane::~OverlayPlane() {
31 }
32
33 // static
34 const OverlayPlane* OverlayPlane::GetPrimaryPlane(
35 const OverlayPlaneList& overlays) {
36 for (size_t i = 0; i < overlays.size(); ++i) {
37 if (overlays[i].z_order == 0)
38 return &overlays[i];
39 }
40
41 return nullptr;
42 }
43
44 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/overlay_plane.h ('k') | ui/ozone/platform/drm/gpu/page_flip_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698