hostsupport/hostegl/src/TransparentColor.cpp
branchbug235_bringup_0
changeset 53 c2ef9095503a
equal deleted inserted replaced
52:39e5f73667ba 53:c2ef9095503a
       
     1 /* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2  *
       
     3  * Permission is hereby granted, free of charge, to any person obtaining a
       
     4  * copy of this software and /or associated documentation files
       
     5  * (the "Materials "), to deal in the Materials without restriction,
       
     6  * including without limitation the rights to use, copy, modify, merge,
       
     7  * publish, distribute, sublicense, and/or sell copies of the Materials,
       
     8  * and to permit persons to whom the Materials are furnished to do so,
       
     9  * subject to the following conditions:
       
    10  *
       
    11  * The above copyright notice and this permission notice shall be included
       
    12  * in all copies or substantial portions of the Materials.
       
    13  *
       
    14  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
       
    15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
       
    17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
       
    18  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
       
    19  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
       
    20  * THE USE OR OTHER DEALINGS IN THE MATERIALS.
       
    21  *
       
    22  * Initial Contributors:
       
    23  * Nokia Corporation - initial contribution.
       
    24  *
       
    25  * Contributors:
       
    26  *
       
    27  * Description:
       
    28  *
       
    29  */
       
    30 
       
    31 #include "TransparentColor.h"
       
    32 
       
    33 CTransparentColor::~CTransparentColor(void)
       
    34     {
       
    35     }
       
    36 
       
    37 CTransparentColor::CTransparentColor( EGLint type, EGLint redValue, EGLint greenValue, EGLint blueValue ) :
       
    38     m_transparentType( type ),
       
    39     m_redValue( redValue ),
       
    40     m_greenValue( greenValue ),
       
    41     m_blueValue( blueValue )
       
    42     {
       
    43     }
       
    44 
       
    45 void CTransparentColor::SetAttribute( EGLint attribute, EGLint value )
       
    46     {
       
    47     switch( attribute )
       
    48         {
       
    49         case EGL_TRANSPARENT_TYPE:
       
    50             {
       
    51             m_transparentType = value;
       
    52             break;
       
    53             }
       
    54         case EGL_TRANSPARENT_RED_VALUE:
       
    55             {
       
    56             m_redValue = value;
       
    57             break;
       
    58             }
       
    59         case EGL_TRANSPARENT_GREEN_VALUE:
       
    60             {
       
    61             m_greenValue = value;
       
    62             break;
       
    63             }
       
    64         case EGL_TRANSPARENT_BLUE_VALUE:
       
    65             {
       
    66             m_blueValue = value;
       
    67             break;
       
    68             }
       
    69         default:
       
    70             EGLI_ASSERT( false );
       
    71         }
       
    72     }