12ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel/* 22ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* Copyright (c) 2016, The Linux Foundation. All rights reserved. 32ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* 42ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* Redistribution and use in source and binary forms, with or without 52ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* modification, are permitted provided that the following conditions are 62ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* met: 72ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* * Redistributions of source code must retain the above copyright 82ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* notice, this list of conditions and the following disclaimer. 92ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* * Redistributions in binary form must reproduce the above 102ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* copyright notice, this list of conditions and the following 112ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* disclaimer in the documentation and/or other materials provided 122ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* with the distribution. 132ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* * Neither the name of The Linux Foundation nor the names of its 142ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* contributors may be used to endorse or promote products derived 152ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* from this software without specific prior written permission. 162ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* 172ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 182ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 192ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 202ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 212ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 222ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 232ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 242ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 252ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 262ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 272ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel*/ 292ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel 302ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel#ifndef __FORMATS_H__ 312ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel#define __FORMATS_H__ 322ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel 332ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel#include <core/layer_stack.h> 342ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel 352ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudelnamespace sdm { 362ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel 372ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudelbool IsUBWCFormat(LayerBufferFormat format); 382ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudelbool Is10BitFormat(LayerBufferFormat format); 392ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudelconst char *GetFormatString(const LayerBufferFormat &format); 40051dfd82677c3ad0bb124eb403b75e243650234eThierry StrudelBufferLayout GetBufferLayout(LayerBufferFormat format); 412ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel 422ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel} // namespace sdm 432ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel 442ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel#endif // __FORMATS_H__ 452ebc25b87caae537b8cd97beb8a86a7ff5f0cdf4Thierry Strudel 46