199c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall/* 299c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * Copyright 2013 The Android Open Source Project 399c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * 499c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * Licensed under the Apache License, Version 2.0 (the "License"); 599c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * you may not use this file except in compliance with the License. 699c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * You may obtain a copy of the License at 799c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * 899c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * http://www.apache.org/licenses/LICENSE-2.0 999c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * 1099c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * Unless required by applicable law or agreed to in writing, software 1199c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * distributed under the License is distributed on an "AS IS" BASIS, 1299c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1399c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * See the License for the specific language governing permissions and 1499c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall * limitations under the License. 1599c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall */ 1699c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 1799c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall#ifndef ANDROID_SF_VIRTUAL_DISPLAY_SURFACE_H 1899c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall#define ANDROID_SF_VIRTUAL_DISPLAY_SURFACE_H 1999c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 2099c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall#include "DisplaySurface.h" 2199c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 2299c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall// --------------------------------------------------------------------------- 2399c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hallnamespace android { 2499c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall// --------------------------------------------------------------------------- 2599c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 2699c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hallclass HWComposer; 2799c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 28e737c11cd83a449d9a544c5c6d4e0dfd42250a56Jesse Hall/* This DisplaySurface implementation is a stub used for developing HWC 29e737c11cd83a449d9a544c5c6d4e0dfd42250a56Jesse Hall * virtual display support. It is currently just a passthrough. 3080e0a397a4712666661ecc629a64ec26e7f6aac3Jesse Hall */ 3199c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hallclass VirtualDisplaySurface : public DisplaySurface { 3299c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hallpublic: 33ffe1f19ca9707f84cb9fdb06209bf36cd8c2ef0aJesse Hall VirtualDisplaySurface(HWComposer& hwc, int32_t dispId, 3499c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall const sp<IGraphicBufferProducer>& sink, 3599c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall const String8& name); 3699c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 3799c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall virtual sp<IGraphicBufferProducer> getIGraphicBufferProducer() const; 3899c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 3999c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall virtual status_t compositionComplete(); 4099c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall virtual status_t advanceFrame(); 41851cfe834295224cd64bdd499872b95b19c4de8cJesse Hall virtual void onFrameCommitted(); 4299c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall virtual void dump(String8& result) const; 4399c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 4499c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hallprivate: 4599c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall virtual ~VirtualDisplaySurface(); 4699c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 47e737c11cd83a449d9a544c5c6d4e0dfd42250a56Jesse Hall sp<IGraphicBufferProducer> mSink; 4899c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall}; 4999c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 5099c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall// --------------------------------------------------------------------------- 5199c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall} // namespace android 5299c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall// --------------------------------------------------------------------------- 5399c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 5499c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall#endif // ANDROID_SF_VIRTUAL_DISPLAY_SURFACE_H 5599c7dbb24994df2f3e175f7b25dd2c9dd92a72f0Jesse Hall 56