blob: e0a4de6605df4a12747347d15ac2ce699d6c51aa [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
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -070020#include "DisplayHardware/DisplayDeviceBase.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 Agopian0f2f5ff2012-07-31 23:09:07 -070025DisplayDeviceBase::DisplayDeviceBase(uint32_t displayIndex) {
Mathias Agopianb60314a2012-04-10 22:09:54 -070026 mScreenAcquired = true;
Mathias Agopianf6de1c02012-02-05 02:15:28 -080027}
28
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -070029DisplayDeviceBase::~DisplayDeviceBase() {
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080030}
31
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -070032bool DisplayDeviceBase::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 Agopian0f2f5ff2012-07-31 23:09:07 -070036void DisplayDeviceBase::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 Agopian0f2f5ff2012-07-31 23:09:07 -070040void DisplayDeviceBase::acquireScreen() const {
Mathias Agopian67016af2012-02-02 15:14:13 -080041 mScreenAcquired = true;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080042}
43
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -070044bool DisplayDeviceBase::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