michael@0: /* michael@0: * Copyright (C) 2007 The Android Open Source Project michael@0: * Copyright (C) 2013 Mozilla Foundation michael@0: * michael@0: * Licensed under the Apache License, Version 2.0 (the "License"); michael@0: * you may not use this file except in compliance with the License. michael@0: * You may obtain a copy of the License at michael@0: * michael@0: * http://www.apache.org/licenses/LICENSE-2.0 michael@0: * michael@0: * Unless required by applicable law or agreed to in writing, software michael@0: * distributed under the License is distributed on an "AS IS" BASIS, michael@0: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. michael@0: * See the License for the specific language governing permissions and michael@0: * limitations under the License. michael@0: */ michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: #include michael@0: #include michael@0: michael@0: #include "FakeSurfaceComposer.h" michael@0: michael@0: namespace android { michael@0: michael@0: /* static */ michael@0: void FakeSurfaceComposer::instantiate() { michael@0: defaultServiceManager()->addService( michael@0: String16("SurfaceFlinger"), new FakeSurfaceComposer()); michael@0: } michael@0: michael@0: FakeSurfaceComposer::FakeSurfaceComposer() michael@0: : BnSurfaceComposer() michael@0: { michael@0: } michael@0: michael@0: FakeSurfaceComposer::~FakeSurfaceComposer() michael@0: { michael@0: } michael@0: michael@0: sp FakeSurfaceComposer::createConnection() michael@0: { michael@0: return nullptr; michael@0: } michael@0: michael@0: sp FakeSurfaceComposer::createGraphicBufferAlloc() michael@0: { michael@0: sp gba(new GraphicBufferAlloc()); michael@0: return gba; michael@0: } michael@0: michael@0: sp FakeSurfaceComposer::createDisplay(const String8& displayName, michael@0: bool secure) michael@0: { michael@0: return nullptr; michael@0: } michael@0: michael@0: #if ANDROID_VERSION >= 19 michael@0: void FakeSurfaceComposer::destroyDisplay(const sp& display) michael@0: { michael@0: } michael@0: #endif michael@0: michael@0: sp FakeSurfaceComposer::getBuiltInDisplay(int32_t id) { michael@0: return nullptr; michael@0: } michael@0: michael@0: void FakeSurfaceComposer::setTransactionState( michael@0: const Vector& state, michael@0: const Vector& displays, michael@0: uint32_t flags) michael@0: { michael@0: } michael@0: michael@0: void FakeSurfaceComposer::bootFinished() michael@0: { michael@0: } michael@0: michael@0: bool FakeSurfaceComposer::authenticateSurfaceTexture( michael@0: const sp& bufferProducer) const { michael@0: return false; michael@0: } michael@0: michael@0: sp FakeSurfaceComposer::createDisplayEventConnection() { michael@0: return nullptr; michael@0: } michael@0: michael@0: status_t FakeSurfaceComposer::captureScreen(const sp& display, michael@0: const sp& producer, michael@0: uint32_t reqWidth, uint32_t reqHeight, michael@0: uint32_t minLayerZ, uint32_t maxLayerZ, michael@0: bool isCpuConsumer) { michael@0: return INVALID_OPERATION; michael@0: } michael@0: michael@0: #if ANDROID_VERSION >= 19 michael@0: status_t FakeSurfaceComposer::captureScreen(const sp& display, michael@0: const sp& producer, michael@0: uint32_t reqWidth, uint32_t reqHeight, michael@0: uint32_t minLayerZ, uint32_t maxLayerZ) { michael@0: return INVALID_OPERATION; michael@0: } michael@0: #endif michael@0: michael@0: void FakeSurfaceComposer::blank(const sp& display) { michael@0: } michael@0: michael@0: void FakeSurfaceComposer::unblank(const sp& display) { michael@0: } michael@0: michael@0: status_t FakeSurfaceComposer::getDisplayInfo(const sp& display, DisplayInfo* info) { michael@0: return INVALID_OPERATION; michael@0: } michael@0: michael@0: }; // namespace android