/frameworks/base/libs/hwui/ |
H A D | TextureCache.cpp | 46 INIT_LOGD(" Setting texture cache size to %sMB", property); 49 INIT_LOGD(" Using default texture cache size of %.2fMB", DEFAULT_TEXTURE_CACHE_SIZE); 54 INIT_LOGD(" Setting texture cache flush rate to %.2f%%", flushRate * 100.0f); 57 INIT_LOGD(" Using default texture cache flush rate of %.2f%%", 78 INIT_LOGD(" Maximum texture dimension is %d pixels", mMaxTextureSize); 110 void TextureCache::operator()(uint32_t&, Texture*& texture) { argument 112 if (texture) { 113 mSize -= texture->bitmapSize; 115 texture->id, texture 158 Texture* texture = mCache.get(bitmap->pixelRef()->getStableID()); local 200 Texture* texture = getCachedTexture(bitmap); local 208 Texture* texture = getCachedTexture(bitmap); local 226 Texture* texture = new Texture(); local 272 generateTexture(const SkBitmap* bitmap, Texture* texture, bool regenerate) argument [all...] |
H A D | PathCache.cpp | 114 // will be applied later when compositing the alpha8 texture 138 PathTexture* texture = new PathTexture(Caches::getInstance()); local 139 texture->left = left; 140 texture->top = top; 141 texture->offset = offset; 142 texture->width = width; 143 texture->height = height; 144 texture->generation = id; 145 return texture; 199 void PathCache::operator()(PathDescription& entry, PathTexture*& texture) { argument 207 removeTexture(PathTexture* texture) argument 271 PathTexture* texture = createTexture(left, top, offset, width, height, local 278 generateTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture, bool addToCache) argument 307 generateTexture(SkBitmap& bitmap, Texture* texture) argument 344 PathTexture* texture = t->texture; local 425 PathTexture* texture = mCache.get(entry); local 467 PathTexture* texture = mCache.get(entry); local 512 PathTexture* texture = get(entry); local 534 PathTexture* texture = get(entry); local 555 PathTexture* texture = get(entry); local 578 PathTexture* texture = get(entry); local 605 PathTexture* texture = get(entry); local [all...] |
H A D | TextDropShadowCache.cpp | 150 void TextDropShadowCache::operator()(ShadowText&, ShadowTexture*& texture) { argument 151 if (texture) { 152 mSize -= texture->bitmapSize; 155 ALOGD("Shadow texture deleted, size = %d", texture->bitmapSize); 158 texture->deleteTexture(); 159 delete texture; 174 ShadowTexture* texture = mCache.get(entry); local 176 if (!texture) { 188 texture [all...] |
H A D | GradientCache.cpp | 118 void GradientCache::operator()(GradientCacheEntry&, Texture*& texture) { argument 119 if (texture) { 120 const uint32_t size = texture->width * texture->height * bytesPerPixel(); 123 texture->deleteTexture(); 124 delete texture; 134 Texture* texture = mCache.get(gradient); local 136 if (!texture) { 137 texture = addLinearGradient(gradient, colors, positions, count); 140 return texture; 176 Texture* texture = new Texture(); local 241 generateTexture(uint32_t* colors, float* positions, Texture* texture) argument [all...] |
H A D | AssetAtlas.h | 41 * texture. Each bitmap is associated with a location, defined in pixels, 43 * an external texture using the EGLImageKHR extension. 70 * A "virtual texture" object that represents the texture 71 * this entry belongs to. This texture should never be 74 Texture* texture; member in struct:android::uirenderer::AssetAtlas::Entry 77 * Maps texture coordinates in the [0..1] range into the 92 return texture->blend ? &atlas.mBlendKey : &atlas.mOpaqueKey; 97 Texture* texture, const UvMapper& mapper, const AssetAtlas& atlas): 99 texture(textur 96 Entry(SkBitmap* bitmap, int x, int y, bool rotated, Texture* texture, const UvMapper& mapper, const AssetAtlas& atlas) argument [all...] |
H A D | Layer.cpp | 43 , texture(caches) 53 texture.width = layerWidth; 54 texture.height = layerHeight; 75 if (stencil || fbo || texture.id) { 200 if (texture.id) { 201 caches.bindTexture(renderTarget, texture.id); 212 if (!texture.id) { 213 glGenTextures(1, &texture.id); 218 if (texture.id) { 219 texture [all...] |
H A D | AssetAtlas.cpp | 75 entry->texture->id = mTexture->id; 90 return index >= 0 ? mEntries.valueAt(index)->texture : NULL; 94 * Delegates changes to wrapping and filtering to the base atlas texture 139 Texture* texture = new DelegateTexture(caches, mTexture); local 140 texture->blend = !bitmap->isOpaque(); 141 texture->width = bitmap->width(); 142 texture->height = bitmap->height(); 144 Entry* entry = new Entry(bitmap, x, y, rotated, texture, mapper, *this); 145 texture->uvMapper = &entry->uvMapper;
|
H A D | DeferredLayerUpdater.h | 59 ANDROID_API void setSurfaceTexture(const sp<GLConsumer>& texture, bool needsAttach) { argument 60 if (texture.get() != mSurfaceTexture.get()) { 62 mSurfaceTexture = texture;
|
H A D | Layer.h | 53 * A layer has dimensions and is backed by an OpenGL texture or FBO. 88 * texture coordinates. 95 const float texX = 1.0f / float(texture.width); 96 const float texY = 1.0f / float(texture.height); 113 return texture.width; 117 return texture.height; 121 * Resize the layer and its texture if needed. 132 texture.width = width; 133 texture.height = height; 139 texture 362 Texture texture; member in class:android::uirenderer::Layer [all...] |
H A D | SkiaShader.cpp | 58 static inline void bindTexture(Caches* caches, Texture* texture, GLenum wrapS, GLenum wrapT) { argument 59 caches->bindTexture(texture->id); 60 texture->setWrapST(wrapS, wrapT); 209 Texture* texture; member in struct:android::uirenderer::BitmapShaderInfo 216 Texture* texture = caches->textureCache.get(&bitmap); local 217 if (!texture) return false; 219 const float width = texture->width; 220 const float height = texture->height; 248 shaderInfo->texture = texture; 280 Texture* texture = shaderInfo.texture; local 399 Texture* texture = caches->gradientCache.get(gradInfo.fColors, gradInfo.fColorOffsets, local [all...] |
H A D | PathCache.h | 59 * Alpha texture used to represent a path. 157 * Any texture added to the cache causing the cache to grow beyond the maximum 158 * allowed size will also cause the oldest texture to be kicked out. 169 void operator()(PathDescription& path, PathTexture*& texture); 237 * Generates the texture from a bitmap into the specified texture structure. 239 void generateTexture(SkBitmap& bitmap, Texture* texture); 240 void generateTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture, 254 * Ensures there is enough space in the cache for a texture of the specified 259 void removeTexture(PathTexture* texture); 274 PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture) argument 288 PathTexture* texture; member in class:android::uirenderer::PathCache::PathTask [all...] |
H A D | Texture.h | 29 * Represents an OpenGL texture. 55 * Convenience method to call glDeleteTextures() on this texture's id. 60 * Name of the texture. 68 * Indicates whether the texture requires blending. 80 * Indicates whether this texture should be cleaned up after use. 88 * Indicates whether this texture will use trilinear filtering. 93 * Optional, pointer to a texture coordinates mapper. 105 * Last wrap modes set on this texture. Defaults to GL_CLAMP_TO_EDGE. 111 * Last filters set on this texture. Defaults to GL_NEAREST. 124 AutoTexture(const Texture* texture) argument [all...] |
H A D | OpenGLRenderer.cpp | 695 * texture. Unfortunately, this is inefficient as it requires every primitive to 709 * a layer is created, only a texture is created, not an FBO. The content of the 710 * frame buffer contained within the layer's bounds is copied into this texture 715 * To compose the layers back onto the frame buffer, each layer texture 787 // Unfortunately some drivers will turn the entire target texture black 820 // Bind texture to FBO 824 // Initialize the texture if needed 870 // Detach the texture from the FBO 1816 void OpenGLRenderer::setupDrawTexture(GLuint texture) { argument 1817 if (texture) bindTextur 1822 setupDrawExternalTexture(GLuint texture) argument 1933 drawAlphaBitmap(Texture* texture, float left, float top, const SkPaint* paint) argument 1968 Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap); local 1999 Texture* texture = getTexture(bitmap); local 2018 Texture* texture = mCaches.textureCache.getTransient(bitmap); local 2060 Texture* texture = mRenderState.assetAtlas().getEntryTexture(bitmap); local 2159 Texture* texture = getTexture(bitmap); local 2259 Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap); local 2313 Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap); local 2470 drawShape(float left, float top, const PathTexture* texture, const SkPaint* paint) argument 2493 const PathTexture* texture = mCaches.pathCache.getRoundRect( local 2511 const PathTexture* texture = mCaches.pathCache.getCircle(radius, p); local 2534 const PathTexture* texture = mCaches.pathCache.getOval(right - left, bottom - top, p); local 2558 const PathTexture* texture = mCaches.pathCache.getArc(right - left, bottom - top, local 2595 const PathTexture* texture = local 2876 const PathTexture* texture = mCaches.pathCache.get(path, paint); local 3039 Texture* texture = mRenderState.assetAtlas().getEntryTexture(bitmap); local 3046 drawPathTexture(const PathTexture* texture, float x, float y, const SkPaint* paint) argument 3261 drawTextureRect(float left, float top, float right, float bottom, Texture* texture, const SkPaint* paint) argument 3297 drawTextureMesh(float left, float top, float right, float bottom, GLuint texture, const SkPaint* paint, bool blend, GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount, bool swapSrcDst, bool ignoreTransform, GLuint vbo, ModelViewMode modelViewMode, bool dirty) argument 3324 drawIndexedTextureMesh(float left, float top, float right, float bottom, GLuint texture, const SkPaint* paint, bool blend, GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount, bool swapSrcDst, bool ignoreTransform, GLuint vbo, ModelViewMode modelViewMode, bool dirty) argument 3351 drawAlpha8TextureMesh(float left, float top, float right, float bottom, GLuint texture, const SkPaint* paint, GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount, bool ignoreTransform, ModelViewMode modelViewMode, bool dirty) argument [all...] |
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/ |
H A D | GLCanvas.java | 92 // Draws a texture to the specified rectangle. 94 BasicTexture texture, int x, int y, int width, int height); 99 // Draws the source rectangle part of the texture to the target rectangle. 100 public abstract void drawTexture(BasicTexture texture, RectF source, RectF target); argument 102 // Draw a texture with a specified texture transform. 103 public abstract void drawTexture(BasicTexture texture, float[] mTextureTransform, argument 106 // Draw two textures to the specified rectangle. The actual texture used is 112 // Draw a region of a texture and a specified color to the specified 114 // The region of the texture i 93 drawTexture( BasicTexture texture, int x, int y, int width, int height) argument 123 unloadTexture(BasicTexture texture) argument 135 beginRenderTarget(RawTexture texture) argument 147 setTextureParameters(BasicTexture texture) argument 156 initializeTextureSize(BasicTexture texture, int format, int type) argument 164 initializeTexture(BasicTexture texture, Bitmap bitmap) argument 177 texSubImage2D(BasicTexture texture, int xOffset, int yOffset, Bitmap bitmap, int format, int type) argument [all...] |
H A D | GLES20Canvas.java | 153 // Screen size for when we aren't bound to a texture 173 // Handle indices -- texture 253 // texture. 582 public void drawTexture(BasicTexture texture, int x, int y, int width, int height) { argument 586 copyTextureCoordinates(texture, mTempSourceRect); 588 convertCoordinate(mTempSourceRect, mTempTargetRect, texture); 589 drawTextureRect(texture, mTempSourceRect, mTempTargetRect); 592 private static void copyTextureCoordinates(BasicTexture texture, RectF outRect) { argument 595 int right = texture.getWidth(); 596 int bottom = texture 607 drawTexture(BasicTexture texture, RectF source, RectF target) argument 619 drawTexture(BasicTexture texture, float[] textureTransform, int x, int y, int w, int h) argument 628 drawTextureRect(BasicTexture texture, RectF source, RectF target) argument 643 convertCoordinate(RectF source, RectF target, BasicTexture texture) argument 667 drawTextureRect(BasicTexture texture, float[] textureMatrix, RectF target) argument 686 prepareTexture(BasicTexture texture) argument 700 prepareTexture(BasicTexture texture, int program, ShaderParameter[] params) argument 716 drawMesh(BasicTexture texture, int x, int y, int xyBuffer, int uvBuffer, int indexBuffer, int indexCount) argument 758 drawMixed(BasicTexture texture, int toColor, float ratio, int x, int y, int w, int h) argument 765 drawMixed(BasicTexture texture, int toColor, float ratio, RectF source, RectF target) argument 786 unloadTexture(BasicTexture texture) argument 840 beginRenderTarget(RawTexture texture) argument 851 setRenderTarget(BasicTexture oldTexture, RawTexture texture) argument 904 setTextureParameters(BasicTexture texture) argument 915 initializeTextureSize(BasicTexture texture, int format, int type) argument 925 initializeTexture(BasicTexture texture, Bitmap bitmap) argument 933 texSubImage2D(BasicTexture texture, int xOffset, int yOffset, Bitmap bitmap, int format, int type) argument [all...] |
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | Alpha8BitmapActivity.java | 49 Bitmap texture = BitmapFactory.decodeResource(c.getResources(), R.drawable.spot_mask); 50 mBitmap1 = Bitmap.createBitmap(texture.getWidth(), texture.getHeight(), 53 canvas.drawBitmap(texture, 0.0f, 0.0f, null); 55 texture = BitmapFactory.decodeResource(c.getResources(), R.drawable.sunset1); 56 BitmapShader shader = new BitmapShader(texture, 59 final float width = texture.getWidth() / 3.0f; 60 final float height = texture.getHeight() / 3.0f;
|
H A D | AdvancedBlendActivity.java | 63 Bitmap texture = BitmapFactory.decodeResource(c.getResources(), R.drawable.sunset1); 64 mTexWidth = texture.getWidth(); 65 mTexHeight = texture.getHeight(); 69 mScaledShader = new BitmapShader(texture, Shader.TileMode.MIRROR, 75 mScaled2Shader = new BitmapShader(texture, Shader.TileMode.MIRROR,
|
/frameworks/base/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ |
H A D | TextureRenderTarget.java | 41 mData.texture = tex; 43 mField.set_texture(0, mData.texture, true);
|
H A D | Texture2D.java | 68 mData.texture = tex != null ? tex : SceneManager.getDefaultTex2D(); 70 mField.set_texture(0, mData.texture, true); 101 mData.texture = SceneManager.getDefaultTex2D();
|
H A D | TextureCube.java | 69 mData.texture = tex != null ? tex : SceneManager.getDefaultTexCube(); 71 mField.set_texture(0, mData.texture, true); 102 mData.texture = SceneManager.getDefaultTexCube();
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
H A D | TransformUtils.java | 67 TextureSource texture = frame.lockTextureSource(); 68 texture.generateMipmaps(); 73 TextureSource texture = frame.lockTextureSource(); 74 texture.setParameter(param, value);
|
/frameworks/native/services/surfaceflinger/RenderEngine/ |
H A D | GLES20RenderEngine.cpp | 156 void GLES20RenderEngine::setupLayerTexturing(const Texture& texture) { argument 157 GLuint target = texture.getTextureTarget(); 158 glBindTexture(target, texture.getTextureName()); 160 if (texture.getFiltering()) { 168 mState.setTexture(texture); 173 Texture texture(Texture::TEXTURE_2D, mProtectedTexName); 174 texture.setDimensions(1, 1); // FIXME: we should get that from somewhere 175 mState.setTexture(texture); 190 // turn our EGLImage into a texture 249 // create the texture [all...] |
H A D | Description.cpp | 62 void Description::setTexture(const Texture& texture) { argument 63 mTexture = texture;
|
/frameworks/native/opengl/libagl/ |
H A D | texture.cpp | 1 /* libs/opengles/texture.cpp 23 #include "texture.h" 33 ogles_context_t* c, int tmu, GLuint texture, const sp<EGLTextureObject>& tex); 50 // each context has a default named (0) texture (not shared) 54 // bind the default texture to each texture unit 57 memset(c->current.texture[i].v, 0, sizeof(vec4_t)); 58 c->current.texture[i].Q = 0x10000; 68 if (c->textures.tmu[i].texture) 69 c->textures.tmu[i].texture 342 bindTextureTmu( ogles_context_t* c, int tmu, GLuint texture, const sp<EGLTextureObject>& tex) argument 854 glActiveTexture(GLenum texture) argument 865 glBindTexture(GLenum target, GLuint texture) argument [all...] |
/frameworks/base/opengl/java/android/opengl/ |
H A D | ETC1Util.java | 32 * Convenience method to load an ETC1 texture whether or not the active OpenGL context 33 * supports the ETC1 texture compression format. 34 * @param target the texture target. 35 * @param level the texture level 37 * @param fallbackFormat the format to use if ETC1 texture compression is not supported. 39 * @param fallbackType the type to use if ETC1 texture compression is not supported. 42 * @param input the input stream containing an ETC1 texture in PKM format. 52 * Convenience method to load an ETC1 texture whether or not the active OpenGL context 53 * supports the ETC1 texture compression format. 54 * @param target the texture targe 64 loadTexture(int target, int level, int border, int fallbackFormat, int fallbackType, ETC1Texture texture) argument 206 writeTexture(ETC1Texture texture, OutputStream output) argument [all...] |