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