blob: 41411812508a0db3597d3958bb8431eb5481d19c [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
Mathias Agopian67016af2012-02-02 15:14:13 -08002 * Copyright (C) 2012 The Android Open Source Project
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Mathias Agopian921e6ac2012-07-23 23:11:29 -070017#include <stdint.h>
18#include <sys/types.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080019
20#include "DisplayHardware/DisplayHardwareBase.h"
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080021
22// ----------------------------------------------------------------------------
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080023namespace android {
24
Mathias Agopian921e6ac2012-07-23 23:11:29 -070025DisplayHardwareBase::DisplayHardwareBase(uint32_t displayIndex) {
Mathias Agopianb60314a2012-04-10 22:09:54 -070026 mScreenAcquired = true;
Mathias Agopianf6de1c02012-02-05 02:15:28 -080027}
28
Mathias Agopian67016af2012-02-02 15:14:13 -080029DisplayHardwareBase::~DisplayHardwareBase() {
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080030}
31
Mathias Agopian67016af2012-02-02 15:14:13 -080032bool DisplayHardwareBase::canDraw() const {
Mathias Agopianf7cdd052011-10-10 22:18:55 -070033 return mScreenAcquired;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080034}
35
Mathias Agopian67016af2012-02-02 15:14:13 -080036void DisplayHardwareBase::releaseScreen() const {
Mathias Agopianb60314a2012-04-10 22:09:54 -070037 mScreenAcquired = false;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080038}
39
Mathias Agopian67016af2012-02-02 15:14:13 -080040void DisplayHardwareBase::acquireScreen() const {
41 mScreenAcquired = true;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080042}
43
Mathias Agopian67016af2012-02-02 15:14:13 -080044bool DisplayHardwareBase::isScreenAcquired() const {
Mathias Agopian59119e62010-10-11 12:37:43 -070045 return mScreenAcquired;
46}
47
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080048}; // namespace android