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
201e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease#include <utils/Functor.h>
21e3a9b24b5e3f9b2058486814a6d27729e51ad466Romain Guy#include <utils/LruCache.h>
22694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy#include <utils/Vector.h>
231f5762e646bed2290934280464832782766ee68eMathias Agopian#include <utils/StrongPointer.h>
24694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
25694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy#include <SkPaint.h>
26694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
27694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy#include <GLES2/gl2.h>
28694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
299f5dab3fc228fa11c32b483e6101ec086895a32bRomain Guy#include "font/FontUtil.h"
309f5dab3fc228fa11c32b483e6101ec086895a32bRomain Guy#include "font/CacheTexture.h"
319f5dab3fc228fa11c32b483e6101ec086895a32bRomain Guy#include "font/CachedGlyphInfo.h"
329f5dab3fc228fa11c32b483e6101ec086895a32bRomain Guy#include "font/Font.h"
33115096f50a560e64a7f95d37686d4861042c7aebRomain Guy#include "utils/SortedList.h"
34e3a9b24b5e3f9b2058486814a6d27729e51ad466Romain Guy#include "Matrix.h"
3551769a68a5cb34e9564740c6a854fcb93018789dRomain Guy#include "Properties.h"
3609147fbdc8206a0cac78bfe9083e7e15b3c5689cRomain Guy
37e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#ifdef ANDROID_ENABLE_RENDERSCRIPT
38250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray#include "RenderScript.h"
39f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craiknamespace RSC {
40f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    class Element;
41f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    class RS;
42f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    class ScriptIntrinsicBlur;
43250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    class sp;
44f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik}
45e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#endif
46f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik
47257ae3502cfad43df681b1783528d645bdabc63fRomain Guyclass Functor;
48257ae3502cfad43df681b1783528d645bdabc63fRomain Guy
49694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guynamespace android {
50694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guynamespace uirenderer {
51694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
521e546815bbb736c50679a8aefc25f48561026fc5Victoria Leaseclass OpenGLRenderer;
531e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
541e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease///////////////////////////////////////////////////////////////////////////////
551e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease// TextSetupFunctor
561e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease///////////////////////////////////////////////////////////////////////////////
571e546815bbb736c50679a8aefc25f48561026fc5Victoria Leaseclass TextSetupFunctor: public Functor {
581e546815bbb736c50679a8aefc25f48561026fc5Victoria Leasepublic:
591e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    struct Data {
601e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease        Data(GLenum glyphFormat) : glyphFormat(glyphFormat) {
611e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease        }
621e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
631e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease        GLenum glyphFormat;
641e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    };
651e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
661e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    TextSetupFunctor(OpenGLRenderer* renderer, float x, float y, bool pureTranslate,
671e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease            int alpha, SkXfermode::Mode mode, SkPaint* paint): Functor(),
681e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease            renderer(renderer), x(x), y(y), pureTranslate(pureTranslate),
691e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease            alpha(alpha), mode(mode), paint(paint) {
701e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    }
711e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    ~TextSetupFunctor() { }
721e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
731e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    status_t operator ()(int what, void* data);
741e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
751e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    OpenGLRenderer* renderer;
761e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    float x;
771e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    float y;
781e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    bool pureTranslate;
791e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    int alpha;
801e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    SkXfermode::Mode mode;
811e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    SkPaint* paint;
821e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease};
831e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease
84726aeba80ffc6778a9bc3e0ee957b8d644183505Romain Guy///////////////////////////////////////////////////////////////////////////////
851e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease// FontRenderer
86726aeba80ffc6778a9bc3e0ee957b8d644183505Romain Guy///////////////////////////////////////////////////////////////////////////////
87726aeba80ffc6778a9bc3e0ee957b8d644183505Romain Guy
88694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guyclass FontRenderer {
89694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guypublic:
90694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    FontRenderer();
91694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    ~FontRenderer();
92694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
931e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    void flushLargeCaches(Vector<CacheTexture*>& cacheTextures);
949a8245629d69d81e0b62e52970feaf9c02580e75Chet Haase    void flushLargeCaches();
95694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
96b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy    void setGammaTable(const uint8_t* gammaTable) {
97b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy        mGammaTable = gammaTable;
98b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy    }
99b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy
100e3a9b24b5e3f9b2058486814a6d27729e51ad466Romain Guy    void setFont(SkPaint* paint, const mat4& matrix);
101e816baea651476aca4407200d4a5e629b9ab8dfaChet Haase
102e3a9b24b5e3f9b2058486814a6d27729e51ad466Romain Guy    void precache(SkPaint* paint, const char* text, int numGlyphs, const mat4& matrix);
103cf51a4199835e9604aa4c8b3854306f8fbabbf33Romain Guy    void endPrecaching();
104e816baea651476aca4407200d4a5e629b9ab8dfaChet Haase
105671d6cf460531825a321edb200523d0faa7792c9Romain Guy    // bounds is an out parameter
106671d6cf460531825a321edb200523d0faa7792c9Romain Guy    bool renderPosText(SkPaint* paint, const Rect* clip, const char *text, uint32_t startIndex,
107257ae3502cfad43df681b1783528d645bdabc63fRomain Guy            uint32_t len, int numGlyphs, int x, int y, const float* positions, Rect* bounds,
108527a3aace1dd72432c2e0472a570e030ad04bf16Chris Craik            Functor* functor, bool forceFinish = true);
109527a3aace1dd72432c2e0472a570e030ad04bf16Chris Craik
1109777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy    // bounds is an out parameter
1119777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy    bool renderTextOnPath(SkPaint* paint, const Rect* clip, const char *text, uint32_t startIndex,
1121e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease            uint32_t len, int numGlyphs, SkPath* path, float hOffset, float vOffset, Rect* bounds,
1131e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease            Functor* functor);
114694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
115f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    struct DropShadow {
1161e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy        DropShadow() { };
1171e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy
1181e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy        DropShadow(const DropShadow& dropShadow):
1191e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy            width(dropShadow.width), height(dropShadow.height),
1201e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy            image(dropShadow.image), penX(dropShadow.penX),
1211e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy            penY(dropShadow.penY) {
1221e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy        }
1231e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy
124f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        uint32_t width;
125f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        uint32_t height;
126f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        uint8_t* image;
127f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        int32_t penX;
128f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk        int32_t penY;
129f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    };
130f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk
131f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    // After renderDropShadow returns, the called owns the memory in DropShadow.image
132f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    // and is responsible for releasing it when it's done with it
133f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk    DropShadow renderDropShadow(SkPaint* paint, const char *text, uint32_t startIndex,
134416a847633680d94efb926837efdc18726d54918Raph Levien            uint32_t len, int numGlyphs, uint32_t radius, const float* positions);
135f18136cb3c881a9d16c1a4f0f341732c276936bfAlex Sakhartchouk
136257ae3502cfad43df681b1783528d645bdabc63fRomain Guy    void setTextureFiltering(bool linearFiltering) {
1378087246d9964b11de8ce116bc63b156faa4197e0Romain Guy        mLinearFiltering = linearFiltering;
138c15008e72ec00ca20a271c3006dac649fd07533bRomain Guy    }
139c15008e72ec00ca20a271c3006dac649fd07533bRomain Guy
1401e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    uint32_t getCacheSize(GLenum format) const;
141c15008e72ec00ca20a271c3006dac649fd07533bRomain Guy
1429b1204baf4740b4d443e72157dea98571cf84e1fRomain Guyprivate:
143694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    friend class Font;
144694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
145b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy    const uint8_t* mGammaTable;
146b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy
1472a47c14e2a6f152496b43104bc785c488583fd59Chet Haase    void allocateTextureMemory(CacheTexture* cacheTexture);
1489a8245629d69d81e0b62e52970feaf9c02580e75Chet Haase    void deallocateTextureMemory(CacheTexture* cacheTexture);
1497de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    void initTextTexture();
1501e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    CacheTexture* createCacheTexture(int width, int height, GLenum format, bool allocate);
1517de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    void cacheBitmap(const SkGlyph& glyph, CachedGlyphInfo* cachedGlyph,
152f942cf10e04567f6b9456f6258e29c803b8bfb41Chet Haase            uint32_t *retOriginX, uint32_t *retOriginY, bool precaching);
1531e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    CacheTexture* cacheBitmapInTexture(Vector<CacheTexture*>& cacheTextures, const SkGlyph& glyph,
1541e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease            uint32_t* startX, uint32_t* startY);
155694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
156694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    void flushAllAndInvalidate();
157694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
158694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    void checkInit();
159257ae3502cfad43df681b1783528d645bdabc63fRomain Guy    void initRender(const Rect* clip, Rect* bounds, Functor* functor);
160671d6cf460531825a321edb200523d0faa7792c9Romain Guy    void finishRender();
161694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
1621e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    void issueDrawCommand(Vector<CacheTexture*>& cacheTextures);
163694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    void issueDrawCommand();
1649777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy    void appendMeshQuadNoClip(float x1, float y1, float u1, float v1,
1659777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x2, float y2, float u2, float v2,
1669777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x3, float y3, float u3, float v3,
1679777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x4, float y4, float u4, float v4, CacheTexture* texture);
168d71dd367af604571c7d00ca473184a1b9240eca2Romain Guy    void appendMeshQuad(float x1, float y1, float u1, float v1,
169d71dd367af604571c7d00ca473184a1b9240eca2Romain Guy            float x2, float y2, float u2, float v2,
170d71dd367af604571c7d00ca473184a1b9240eca2Romain Guy            float x3, float y3, float u3, float v3,
1717de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase            float x4, float y4, float u4, float v4, CacheTexture* texture);
1729777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy    void appendRotatedMeshQuad(float x1, float y1, float u1, float v1,
1739777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x2, float y2, float u2, float v2,
1749777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x3, float y3, float u3, float v3,
1759777173eb6c9eb97c7921c8288ebc65e3ab3ce6fRomain Guy            float x4, float y4, float u4, float v4, CacheTexture* texture);
176694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
1779b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    void removeFont(const Font* font);
1789b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy
1799b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    void checkTextureUpdate();
1809b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy
1819b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    void setTextureDirty() {
1829b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy        mUploadTexture = true;
1839b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    }
1849b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy
1857de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    uint32_t mSmallCacheWidth;
1867de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    uint32_t mSmallCacheHeight;
187eb32a499194119b3783b86c925172df02e5d2685Chet Haase    uint32_t mLargeCacheWidth;
188eb32a499194119b3783b86c925172df02e5d2685Chet Haase    uint32_t mLargeCacheHeight;
189694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
1901e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    Vector<CacheTexture*> mACacheTextures;
1911e546815bbb736c50679a8aefc25f48561026fc5Victoria Lease    Vector<CacheTexture*> mRGBACacheTextures;
192694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
19309147fbdc8206a0cac78bfe9083e7e15b3c5689cRomain Guy    Font* mCurrentFont;
194e3a9b24b5e3f9b2058486814a6d27729e51ad466Romain Guy    LruCache<Font::FontDescription, Font*> mActiveFonts;
195694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
1967de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase    CacheTexture* mCurrentCacheTexture;
1977de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86Chet Haase
198694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    bool mUploadTexture;
199694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
200257ae3502cfad43df681b1783528d645bdabc63fRomain Guy    Functor* mFunctor;
20109147fbdc8206a0cac78bfe9083e7e15b3c5689cRomain Guy    const Rect* mClip;
2025b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy    Rect* mBounds;
2035b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy    bool mDrawn;
20409147fbdc8206a0cac78bfe9083e7e15b3c5689cRomain Guy
205694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy    bool mInitialized;
20689a524ac2d4a36739e51b01b336c0bade77e2ee0Alex Sakhartchouk
207e8cb9c14309b0f01c0159efdf9a7198f44a62642Romain Guy    bool mLinearFiltering;
208e8cb9c14309b0f01c0159efdf9a7198f44a62642Romain Guy
209e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#ifdef ANDROID_ENABLE_RENDERSCRIPT
210f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    // RS constructs
211250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    RSC::sp<RSC::RS> mRs;
212250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    RSC::sp<const RSC::Element> mRsElement;
213250b1cfc831fd2a271c09cab547efcc5e3d5f828Tim Murray    RSC::sp<RSC::ScriptIntrinsicBlur> mRsScript;
214e4d9a01bfc7451afff1ed399a5801c7aa2af2831Dan Morrill#endif
215f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik
2169b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    static void computeGaussianWeights(float* weights, int32_t radius);
2179b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    static void horizontalBlur(float* weights, int32_t radius, const uint8_t *source, uint8_t *dest,
2181e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy            int32_t width, int32_t height);
2199b1204baf4740b4d443e72157dea98571cf84e1fRomain Guy    static void verticalBlur(float* weights, int32_t radius, const uint8_t *source, uint8_t *dest,
2201e45aae5de003657e5d18f74d34998f5de5db5b7Romain Guy            int32_t width, int32_t height);
221f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik
222f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    // the input image handle may have its pointer replaced (to avoid copies)
223f2d8ccc15d7272b3416f73605c1f31d1d346bd40Chris Craik    void blurImage(uint8_t** image, int32_t width, int32_t height, int32_t radius);
224694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy};
225694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
226694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy}; // namespace uirenderer
227694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy}; // namespace android
228694b519ac647fe998fd396fe0784cc8e179aadc4Romain Guy
2295b3b35296e8b2c8d3f07d32bb645d5414db41a1dRomain Guy#endif // ANDROID_HWUI_FONT_RENDERER_H
230