1d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu/* 2cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Copyright (c) 2014 Intel Corporation 3cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// 4cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Licensed under the Apache License, Version 2.0 (the "License"); 5cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// you may not use this file except in compliance with the License. 6cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// You may obtain a copy of the License at 7cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// 8cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// http://www.apache.org/licenses/LICENSE-2.0 9cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// 10cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Unless required by applicable law or agreed to in writing, software 11cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// distributed under the License is distributed on an "AS IS" BASIS, 12cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// See the License for the specific language governing permissions and 14cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// limitations under the License. 15cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika*/ 16d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#ifndef SPRITE_PLANE_BASE_H 17d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#define SPRITE_PLANE_BASE_H 18d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu 19d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#include <utils/KeyedVector.h> 200594c42af26255fd8d3d7d39c0cb0e2da5b8841bThierry Strudel#include <common/buffers/BufferCache.h> 21d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#include <DisplayPlane.h> 22d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu 23d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiunamespace android { 24d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiunamespace intel { 25d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu 26d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiuclass SpritePlaneBase : public DisplayPlane { 27d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiupublic: 28d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu SpritePlaneBase(int index, int disp); 29d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu virtual ~SpritePlaneBase(); 30d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiupublic: 31d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu // hardware operations 32e2ad4c047651d4442f6a0e002290016d45e9201afu jin virtual bool flip(void *ctx); 33d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu virtual bool enable(); 34d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu virtual bool disable(); 3568dbca089b413041774b80ef5bf95a4f4a858489Lei Zhang virtual bool isDisabled() = 0; 36d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu 37d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu // display device 38d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu virtual void* getContext() const = 0; 39d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiuprotected: 40d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu virtual bool setDataBuffer(BufferMapper& mapper) = 0; 41e2ad4c047651d4442f6a0e002290016d45e9201afu jin virtual bool enablePlane(bool enabled) = 0; 42d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiuprotected: 43d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu bool mForceBottom; 444a17bd5f8632806430043ab67e10c54a1406a7a2Jackie Li bool mAbovePrimary; 45d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu}; 46d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu 47d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu} // namespace intel 48d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu} // namespace android 49d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu 50d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu#endif /* SPRITE_PLANE_BASE_H */ 51d6e27b5e0db47512cdcf1ea61e6860eab61156ebAndy Qiu 52