os/graphics/fbs/fontandbitmapserver/tfbs/glyphatlastestwrapper.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef GLYPHATLASTESTWRAPPER_H
    17 #define GLYPHATLASTESTWRAPPER_H
    18 
    19 #include "glyphatlas.h"
    20 
    21 
    22 /**
    23 Class to provide access to glyph atlas metrics for test purposes
    24 */
    25 NONSHARABLE_CLASS(CGlyphAtlasTestWrapper)
    26     {
    27 public:
    28 	~CGlyphAtlasTestWrapper();
    29 	static CGlyphAtlasTestWrapper* NewL(TInt aMaxCacheSizeInBytes);
    30 	static CGlyphAtlasTestWrapper* NewLC(TInt aMaxCacheSizeInBytes);
    31 	TInt GetGlyph(const CBitmapFont& aFont, TUint aGlyphCode, TGlyphImageInfo& aGlyphImageInfo);
    32 	TInt AddGlyph(const CBitmapFont& aFont, const CGlyphAtlas::TAddGlyphArgs& aArgs, TGlyphImageInfo& aGlyphImageInfo);
    33 	void FontReleased(const CBitmapFont& aFont);
    34 	
    35 	// Utility functions providing access to internals of glyph atlas
    36 	TInt SizeInBytes() const;
    37 	TInt GlyphCountByFont(const CBitmapFont* aFont);
    38 	TInt GlyphCount();
    39 	TInt FontCount() const;
    40 	TBool LruPageContainsGlyph(TUint aGlyphCode) const;
    41 private:
    42 	CGlyphAtlasTestWrapper();
    43 	void ConstructL(TInt aMaxCacheSizeInBytes);
    44 private:
    45 	CGlyphAtlas* iAtlas;
    46     };
    47 
    48 #endif /* GLYPHATLASTESTWRAPPER_H */