blob: d30e9bf15d18e16de829d66d6a02cc0da62fab1e [file] [log] [blame]
Jesse Hall99c7dbb2013-03-14 14:29:29 -07001/*
2 * Copyright 2013 The Android Open Source Project
3 *
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
17#include <gui/IGraphicBufferProducer.h>
18#include "VirtualDisplaySurface.h"
19
20// ---------------------------------------------------------------------------
21namespace android {
22// ---------------------------------------------------------------------------
23
24VirtualDisplaySurface::VirtualDisplaySurface(HWComposer& hwc, int disp,
25 const sp<IGraphicBufferProducer>& sink, const String8& name)
26: mHwc(hwc),
27 mDisplayId(disp),
28 mSink(sink),
29 mName(name)
30{}
31
32VirtualDisplaySurface::~VirtualDisplaySurface() {
33}
34
35sp<IGraphicBufferProducer> VirtualDisplaySurface::getIGraphicBufferProducer() const {
36 return mSink;
37}
38
39status_t VirtualDisplaySurface::compositionComplete() {
40 return NO_ERROR;
41}
42
43status_t VirtualDisplaySurface::advanceFrame() {
44 return NO_ERROR;
45}
46
47status_t VirtualDisplaySurface::setReleaseFenceFd(int fenceFd) {
48 if (fenceFd >= 0) {
49 ALOGW("[%s] unexpected release fence", mName.string());
50 close(fenceFd);
51 }
52 return NO_ERROR;
53}
54
55void VirtualDisplaySurface::dump(String8& result) const {
56}
57
58// ---------------------------------------------------------------------------
59} // namespace android
60// ---------------------------------------------------------------------------