Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 17 | #include "VirtualDisplaySurface.h" |
Jesse Hall | e737c11 | 2013-05-07 11:58:47 -0700 | [diff] [blame] | 18 | |
| 19 | #include <cutils/log.h> |
| 20 | #include <gui/IGraphicBufferProducer.h> |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 21 | |
| 22 | // --------------------------------------------------------------------------- |
| 23 | namespace android { |
| 24 | // --------------------------------------------------------------------------- |
| 25 | |
Jesse Hall | ffe1f19 | 2013-03-22 15:13:48 -0700 | [diff] [blame] | 26 | VirtualDisplaySurface::VirtualDisplaySurface(HWComposer& hwc, int32_t dispId, |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 27 | const sp<IGraphicBufferProducer>& sink, const String8& name) |
Jesse Hall | e737c11 | 2013-05-07 11:58:47 -0700 | [diff] [blame] | 28 | : mSink(sink) |
Jesse Hall | ffe1f19 | 2013-03-22 15:13:48 -0700 | [diff] [blame] | 29 | { |
Jesse Hall | e737c11 | 2013-05-07 11:58:47 -0700 | [diff] [blame] | 30 | LOG_ALWAYS_FATAL_IF(dispId >= 0); |
Jesse Hall | ffe1f19 | 2013-03-22 15:13:48 -0700 | [diff] [blame] | 31 | } |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 32 | |
| 33 | VirtualDisplaySurface::~VirtualDisplaySurface() { |
| 34 | } |
| 35 | |
| 36 | sp<IGraphicBufferProducer> VirtualDisplaySurface::getIGraphicBufferProducer() const { |
Jesse Hall | e737c11 | 2013-05-07 11:58:47 -0700 | [diff] [blame] | 37 | return mSink; |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | status_t VirtualDisplaySurface::compositionComplete() { |
| 41 | return NO_ERROR; |
| 42 | } |
| 43 | |
| 44 | status_t VirtualDisplaySurface::advanceFrame() { |
Jesse Hall | e737c11 | 2013-05-07 11:58:47 -0700 | [diff] [blame] | 45 | return NO_ERROR; |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 46 | } |
| 47 | |
Jesse Hall | 851cfe8 | 2013-03-20 13:44:00 -0700 | [diff] [blame] | 48 | void VirtualDisplaySurface::onFrameCommitted() { |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | void VirtualDisplaySurface::dump(String8& result) const { |
| 52 | } |
| 53 | |
| 54 | // --------------------------------------------------------------------------- |
| 55 | } // namespace android |
| 56 | // --------------------------------------------------------------------------- |