uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10TextureProcessor.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Definition of CHuiVg10TextureProcessor. 
       
    15 *                CHuiVg10TextureProcessor is a concrete implementation of 
       
    16 *                a texture processor for OpenVG 1.0.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __HUIVG10TEXTUREPROCESSOR_H__
       
    23 #define __HUIVG10TEXTUREPROCESSOR_H__
       
    24 
       
    25 
       
    26 #include "uiacceltk/HuiTextureProcessor.h"
       
    27 
       
    28 
       
    29 /* Forward declarations. */
       
    30 class CHuiVg10PBufferSurface;
       
    31 
       
    32 
       
    33 /**
       
    34  * Texture processor implementation for OpenVG.
       
    35  */
       
    36 NONSHARABLE_CLASS(CHuiVg10TextureProcessor) : public CHuiTextureProcessor
       
    37     {
       
    38 public:
       
    39 
       
    40     /* Constructors and destructor. */
       
    41 
       
    42     /**
       
    43      * Constructs a new texture manager instance.
       
    44      */
       
    45     static CHuiVg10TextureProcessor* NewL(CHuiEnv& aEnv);
       
    46     
       
    47     /**
       
    48      * Constructs a new texture manager instance and leaves it on 
       
    49      * the cleanup stack.
       
    50      */
       
    51     static CHuiVg10TextureProcessor* NewLC(CHuiEnv& aEnv);
       
    52 
       
    53     /**
       
    54      * Destructor.
       
    55      */
       
    56     virtual ~CHuiVg10TextureProcessor();
       
    57     
       
    58     
       
    59     /* Methods. */
       
    60     
       
    61     virtual void BlurL(const THuiTextureHandle& aSrc, THuiTextureHandle& aDest,
       
    62                        TInt aFilterSize, TInt aFlag);
       
    63 
       
    64     virtual void BlurL(const THuiTextureHandle& aSrc, THuiTextureHandle& aDest,
       
    65                        const TSize& aPreferredSize,
       
    66                        TInt aFilterSize, TInt aFlag);
       
    67     virtual void BlurSegmentedL(const MHuiSegmentedTexture& aSrc,
       
    68                        THuiTextureHandle& aDest,
       
    69                        TInt aFilterSize, TInt aFlags); 
       
    70     
       
    71     virtual void BlurSegmentedL(const MHuiSegmentedTexture& aSrc, 
       
    72                        THuiTextureHandle& aDest,
       
    73                        const TSize& aPreferredSize,
       
    74                        TInt aFilterSize, TInt aFlags);                       
       
    75 protected:
       
    76 
       
    77     /* Constructors. */
       
    78 
       
    79     /**
       
    80      * Constructor.
       
    81      */
       
    82     CHuiVg10TextureProcessor(CHuiEnv& aEnv);
       
    83 
       
    84     /**
       
    85      * Second-phase constructor.
       
    86      */
       
    87     void ConstructL();
       
    88 
       
    89 
       
    90     /* Methods. */
       
    91     
       
    92     /**
       
    93      * Renders a blurred texture into the processing buffer. BlurL() calls this
       
    94      * one or more times to produce the final blurred result.
       
    95      *
       
    96      * @param aBlurConfigPtr  Pointer to a THuiBlurConfig struct, which holds 
       
    97      *                        the parameters of the blurring filter. Note that
       
    98      *                        this is an internal struct defined only in the
       
    99      *                        implementation of CHuiVg10TextureProcessor.
       
   100      * @param aSrc  Source texture.
       
   101      * @param aDestTextureName  Name of the OpenVG texture where the blurred
       
   102      *                          result will be stored.
       
   103      * @param aFlags  The same flags that were used in the call to BlurL().
       
   104      */
       
   105     void DrawBlurred(const TAny* aBlurConfigPtr, 
       
   106                      const THuiTextureHandle& aSrc, 
       
   107                      TUint aDestTextureName,
       
   108                      TInt aFlags);
       
   109 
       
   110     /**
       
   111      * Combines two textures so that the end result is an average of both.
       
   112      * The resulting texture uses the same size as the source textures.
       
   113      * Used as part of BlurL() to produce a higher-quality blurring effect.
       
   114      *
       
   115      * @param aSrcTextureName1  Name of the first source texture.
       
   116      * @param aSrcTextureName2  Name of the second source texture.
       
   117      * @param aDestTextureName  Name of the destination texture.
       
   118      * @param aSize  Size of all the three textures.
       
   119      * @param aFlags  The same flags that were used in the call to BlurL().
       
   120      */
       
   121     void DrawAverage(TUint aSrcTextureName1, 
       
   122                      TUint aSrcTextureName2,
       
   123                      TUint aDestTextureName,
       
   124                      const TSize& aSize,
       
   125                      TInt aFlags);
       
   126 
       
   127     void Release();
       
   128     
       
   129     void RestoreL();                     
       
   130 
       
   131 private:
       
   132     };
       
   133 
       
   134 
       
   135 #endif  // __HUIVG10TEXTUREPROCESSOR_H__