1694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy/*
2694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * Copyright (C) 2010 The Android Open Source Project
3694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy *
4694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * Licensed under the Apache License, Version 2.0 (the "License");
5694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * you may not use this file except in compliance with the License.
6694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * You may obtain a copy of the License at
7694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy *
8694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy *      http://www.apache.org/licenses/LICENSE-2.0
9694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy *
10694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * Unless required by applicable law or agreed to in writing, software
11694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * distributed under the License is distributed on an "AS IS" BASIS,
12694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * See the License for the specific language governing permissions and
14694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy * limitations under the License.
15694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy */
16694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
175b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy#ifndef ANDROID_HWUI_FONT_RENDERER_H
185b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy#define ANDROID_HWUI_FONT_RENDERER_H
19694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
2096a5c4c7bab6718524de7253da8309143ab48befChris Craik#include "font/FontUtil.h"
2196a5c4c7bab6718524de7253da8309143ab48befChris Craik#include "font/CacheTexture.h"
2296a5c4c7bab6718524de7253da8309143ab48befChris Craik#include "font/CachedGlyphInfo.h"
2396a5c4c7bab6718524de7253da8309143ab48befChris Craik#include "font/Font.h"
2496a5c4c7bab6718524de7253da8309143ab48befChris Craik
25e3a9b24b5e3f9b2058486814a6d27729e51ad466Romain Guy#include <utils/LruCache.h>
261f5762e646bed2290934280464832782766ee68eMathias Agopian#include <utils/StrongPointer.h>
27694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
28694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy#include <SkPaint.h>
29694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
30694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy#include <GLES2/gl2.h>
31694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
32272a685f17cc4828257e521a6f62b7b17870f75eJohn Reck#include <vector>
33272a685f17cc4828257e521a6f62b7b17870f75eJohn Reck
34e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#ifdef ANDROID_ENABLE_RENDERSCRIPT
35250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray#include "RenderScript.h"
36f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craiknamespace RSC {
37f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    class Element;
38f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    class RS;
39f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    class ScriptIntrinsicBlur;
40250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    class sp;
41f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik}
42e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#endif
43f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik
44694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guynamespace android {
45694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guynamespace uirenderer {
46694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
47a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#if HWUI_NEW_OPS
48a1717271caac5e8ea3808c331d4141ac01a42134Chris Craikclass BakedOpState;
49a1717271caac5e8ea3808c331d4141ac01a42134Chris Craikclass BakedOpRenderer;
50e4db79de127cfe961195f52907af8451026eaa20Chris Craikstruct ClipBase;
51a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#else
521e546815bbb736c50679a8aefc25f48561026fc5Victoria Leaseclass OpenGLRenderer;
53a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#endif
541e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
55828407356dd5c34a3e441604aaf895cbec7c7e66Chris Craikclass TextDrawFunctor {
561e546815bbb736c50679a8aefc25f48561026fc5Victoria Leasepublic:
57a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik    TextDrawFunctor(
58a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#if HWUI_NEW_OPS
59a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            BakedOpRenderer* renderer,
60a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            const BakedOpState* bakedState,
61e4db79de127cfe961195f52907af8451026eaa20Chris Craik            const ClipBase* clip,
62a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#else
63a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            OpenGLRenderer* renderer,
64a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#endif
65a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            float x, float y, bool pureTranslate,
6696a5c4c7bab6718524de7253da8309143ab48befChris Craik            int alpha, SkXfermode::Mode mode, const SkPaint* paint)
6796a5c4c7bab6718524de7253da8309143ab48befChris Craik        : renderer(renderer)
68a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#if HWUI_NEW_OPS
69a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik        , bakedState(bakedState)
7015c3f19a445b8df575911a16e8a6dba755a084b5Chris Craik        , clip(clip)
71a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#endif
7296a5c4c7bab6718524de7253da8309143ab48befChris Craik        , x(x)
7396a5c4c7bab6718524de7253da8309143ab48befChris Craik        , y(y)
7496a5c4c7bab6718524de7253da8309143ab48befChris Craik        , pureTranslate(pureTranslate)
7596a5c4c7bab6718524de7253da8309143ab48befChris Craik        , alpha(alpha)
7696a5c4c7bab6718524de7253da8309143ab48befChris Craik        , mode(mode)
7796a5c4c7bab6718524de7253da8309143ab48befChris Craik        , paint(paint) {
781e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    }
791e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
80e2bb380bc26749782c873e5488cfdf4e42b27346Chris Craik    void draw(CacheTexture& texture, bool linearFiltering);
811e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
82a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#if HWUI_NEW_OPS
83a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik    BakedOpRenderer* renderer;
84a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik    const BakedOpState* bakedState;
85e4db79de127cfe961195f52907af8451026eaa20Chris Craik    const ClipBase* clip;
86a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#else
871e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    OpenGLRenderer* renderer;
88a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik#endif
891e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    float x;
901e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    float y;
911e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    bool pureTranslate;
921e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    int alpha;
931e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    SkXfermode::Mode mode;
94d218a92c0afb8c0d98135b20b52ac87236e1c935Chris Craik    const SkPaint* paint;
951e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease};
961e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
97694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guyclass FontRenderer {
98694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guypublic:
99c08820f587ad94698691a6657e87712de07e484cChris Craik    FontRenderer(const uint8_t* gammaTable);
100694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    ~FontRenderer();
101694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
102272a685f17cc4828257e521a6f62b7b17870f75eJohn Reck    void flushLargeCaches(std::vector<CacheTexture*>& cacheTextures);
1039a8245629d69d81e0b62e52970feaf9c02580e75Chet Haase    void flushLargeCaches();
104694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
10559744b79ec302000802cd56d30a1bf70f0183c80Chris Craik    void setFont(const SkPaint* paint, const SkMatrix& matrix);
106e816baea651476aca4407200d4a5e629b9ab8dfaChet Haase
107e8c3c813b0e3ac98304b17a751ce6e436e252bd9Chris Craik    void precache(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs, const SkMatrix& matrix);
108cf51a4199835e9604aa4c8b3854306f8fbabbf33Romain Guy    void endPrecaching();
109e816baea651476aca4407200d4a5e629b9ab8dfaChet Haase
110e8c3c813b0e3ac98304b17a751ce6e436e252bd9Chris Craik    bool renderPosText(const SkPaint* paint, const Rect* clip, const glyph_t* glyphs,
111a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            int numGlyphs, int x, int y, const float* positions,
112a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            Rect* outBounds, TextDrawFunctor* functor, bool forceFinish = true);
113527a3aace1dd72432c2e0472a570e030ad04bf16Chris Craik
114e8c3c813b0e3ac98304b17a751ce6e436e252bd9Chris Craik    bool renderTextOnPath(const SkPaint* paint, const Rect* clip, const glyph_t* glyphs,
115a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            int numGlyphs, const SkPath* path,
116a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            float hOffset, float vOffset, Rect* outBounds, TextDrawFunctor* functor);
117694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
118f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    struct DropShadow {
119f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        uint32_t width;
120f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        uint32_t height;
121f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        uint8_t* image;
122f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        int32_t penX;
123f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        int32_t penY;
124f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    };
125f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk
126f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    // After renderDropShadow returns, the called owns the memory in DropShadow.image
127f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    // and is responsible for releasing it when it's done with it
128e8c3c813b0e3ac98304b17a751ce6e436e252bd9Chris Craik    DropShadow renderDropShadow(const SkPaint* paint, const glyph_t *glyphs, int numGlyphs,
129a1717271caac5e8ea3808c331d4141ac01a42134Chris Craik            float radius, const float* positions);
130f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk
131257ae3502cfad43df681b1783528d645bdabc63fRomain Guy    void setTextureFiltering(bool linearFiltering) {
1328087246d9964b11de8ce116bc63b156faa4197e0Romain Guy        mLinearFiltering = linearFiltering;
133c15008e72ec00ca20a271c3006dac649fd07533bRomain Guy    }
134c15008e72ec00ca20a271c3006dac649fd07533bRomain Guy
1351e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    uint32_t getCacheSize(GLenum format) const;
136c15008e72ec00ca20a271c3006dac649fd07533bRomain Guy
1379b1204baf4740b4d443e72157dea98571cf84e1fRomain Guyprivate:
138694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    friend class Font;
139694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
140b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy    const uint8_t* mGammaTable;
141b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy
1422a47c14e2a6f152496b43104bc785c488583fd59Chet Haase    void allocateTextureMemory(CacheTexture* cacheTexture);
1439a8245629d69d81e0b62e52970feaf9c02580e75Chet Haase    void deallocateTextureMemory(CacheTexture* cacheTexture);
1447de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    void initTextTexture();
1451e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    CacheTexture* createCacheTexture(int width, int height, GLenum format, bool allocate);
1467de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    void cacheBitmap(const SkGlyph& glyph, CachedGlyphInfo* cachedGlyph,
147f942cf10e04567f6b9456f6258e29c803b8bfb41Chet Haase            uint32_t *retOriginX, uint32_t *retOriginY, bool precaching);
148272a685f17cc4828257e521a6f62b7b17870f75eJohn Reck    CacheTexture* cacheBitmapInTexture(std::vector<CacheTexture*>& cacheTextures, const SkGlyph& glyph,
1491e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease            uint32_t* startX, uint32_t* startY);
150694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
151694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    void flushAllAndInvalidate();
152694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
153694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    void checkInit();
154828407356dd5c34a3e441604aaf895cbec7c7e66Chris Craik    void initRender(const Rect* clip, Rect* bounds, TextDrawFunctor* functor);
155671d6cf460531825a321edb200523d0faa7792c9Romain Guy    void finishRender();
156694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
157272a685f17cc4828257e521a6f62b7b17870f75eJohn Reck    void issueDrawCommand(std::vector<CacheTexture*>& cacheTextures);
158694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    void issueDrawCommand();
1599777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy    void appendMeshQuadNoClip(float x1, float y1, float u1, float v1,
1609777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x2, float y2, float u2, float v2,
1619777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x3, float y3, float u3, float v3,
1629777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x4, float y4, float u4, float v4, CacheTexture* texture);
163d71dd367af604571c7d00ca473184a1b9240eca2Romain Guy    void appendMeshQuad(float x1, float y1, float u1, float v1,
164d71dd367af604571c7d00ca473184a1b9240eca2Romain Guy            float x2, float y2, float u2, float v2,
165d71dd367af604571c7d00ca473184a1b9240eca2Romain Guy            float x3, float y3, float u3, float v3,
1667de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase            float x4, float y4, float u4, float v4, CacheTexture* texture);
1679777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy    void appendRotatedMeshQuad(float x1, float y1, float u1, float v1,
1689777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x2, float y2, float u2, float v2,
1699777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x3, float y3, float u3, float v3,
1709777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x4, float y4, float u4, float v4, CacheTexture* texture);
171694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
1729b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    void checkTextureUpdate();
1739b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy
1749b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    void setTextureDirty() {
1759b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy        mUploadTexture = true;
1769b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    }
1779b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy
1787de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    uint32_t mSmallCacheWidth;
1797de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    uint32_t mSmallCacheHeight;
180eb32a499194119b3783b86c925172df02e5d2685Chet Haase    uint32_t mLargeCacheWidth;
181eb32a499194119b3783b86c925172df02e5d2685Chet Haase    uint32_t mLargeCacheHeight;
182694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
183272a685f17cc4828257e521a6f62b7b17870f75eJohn Reck    std::vector<CacheTexture*> mACacheTextures;
184272a685f17cc4828257e521a6f62b7b17870f75eJohn Reck    std::vector<CacheTexture*> mRGBACacheTextures;
185694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
18609147fbdc8206a0cac78bfe9083e7e15b3c5689cRomain Guy    Font* mCurrentFont;
187e3a9b24b5e3f9b2058486814a6d27729e51ad466Romain Guy    LruCache<Font::FontDescription, Font*> mActiveFonts;
188694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
1897de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    CacheTexture* mCurrentCacheTexture;
1907de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase
191694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    bool mUploadTexture;
192694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
193828407356dd5c34a3e441604aaf895cbec7c7e66Chris Craik    TextDrawFunctor* mFunctor;
19409147fbdc8206a0cac78bfe9083e7e15b3c5689cRomain Guy    const Rect* mClip;
1955b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy    Rect* mBounds;
1965b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy    bool mDrawn;
19709147fbdc8206a0cac78bfe9083e7e15b3c5689cRomain Guy
198694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    bool mInitialized;
19989a524ac2d4a36739e51b01b336c0bade77e2ee0Alex Sakhartchouk
200e8cb9c14309b0f01c0159efdf9a7198f44a62642Romain Guy    bool mLinearFiltering;
201e8cb9c14309b0f01c0159efdf9a7198f44a62642Romain Guy
202e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#ifdef ANDROID_ENABLE_RENDERSCRIPT
203f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    // RS constructs
204250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    RSC::sp<RSC::RS> mRs;
205250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    RSC::sp<const RSC::Element> mRsElement;
206250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    RSC::sp<RSC::ScriptIntrinsicBlur> mRsScript;
207e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#endif
208f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik
2099b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    static void computeGaussianWeights(float* weights, int32_t radius);
2109b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    static void horizontalBlur(float* weights, int32_t radius, const uint8_t *source, uint8_t *dest,
2111e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy            int32_t width, int32_t height);
2129b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    static void verticalBlur(float* weights, int32_t radius, const uint8_t *source, uint8_t *dest,
2131e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy            int32_t width, int32_t height);
214f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik
215f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    // the input image handle may have its pointer replaced (to avoid copies)
216e392c81f6b8f9ace0c0a48c9d4df117fda31fd13Derek Sollenberger    void blurImage(uint8_t** image, int32_t width, int32_t height, float radius);
217694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy};
218694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
219694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy}; // namespace uirenderer
220694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy}; // namespace android
221694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
2225b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy#endif // ANDROID_HWUI_FONT_RENDERER_H
223