/frameworks/base/libs/hwui/renderstate/ |
H A D | TextureState.cpp | 21 // Must define as many texture units as specified by kTextureUnitsCount 37 "At least %d texture units are required!", kTextureUnitsCount); 42 "Tried to use texture unit index %d, only %d exist", 54 void TextureState::bindTexture(GLuint texture) { argument 55 if (mBoundTextures[mTextureUnit] != texture) { 56 glBindTexture(GL_TEXTURE_2D, texture); 57 mBoundTextures[mTextureUnit] = texture; 61 void TextureState::bindTexture(GLenum target, GLuint texture) { argument 63 bindTexture(texture); 68 glBindTexture(target, texture); 72 deleteTexture(GLuint texture) argument 97 unbindTexture(GLuint texture) argument [all...] |
H A D | TextureState.h | 33 * Activate the specified texture unit. The texture unit must 39 * Invalidate the cached value of the active texture unit. 44 * Binds the specified texture as a GL_TEXTURE_2D texture. 45 * All texture bindings must be performed with this method or 48 void bindTexture(GLuint texture); 51 * Binds the specified texture with the specified render target. 52 * All texture bindings must be performed with this method or 55 void bindTexture(GLenum target, GLuint texture); [all...] |
H A D | RenderState.cpp | 270 const Glop::Fill::TextureData& texture = fill.texture; local 271 // texture always takes slot 0, shader samplers increment from there 274 if (texture.clamp != GL_INVALID_ENUM) { 275 texture.texture->setWrap(texture.clamp, true, false, texture.target); 277 if (texture.filter != GL_INVALID_ENUM) { 278 texture [all...] |
/frameworks/base/libs/hwui/ |
H A D | TextureCache.cpp | 49 INIT_LOGD(" Setting texture cache size to %sMB", property); 52 INIT_LOGD(" Using default texture cache size of %.2fMB", DEFAULT_TEXTURE_CACHE_SIZE); 57 INIT_LOGD(" Setting texture cache flush rate to %.2f%%", flushRate * 100.0f); 60 INIT_LOGD(" Using default texture cache flush rate of %.2f%%", 67 INIT_LOGD(" Maximum texture dimension is %d pixels", mMaxTextureSize); 103 void TextureCache::operator()(uint32_t&, Texture*& texture) { argument 105 if (texture) { 106 mSize -= texture->bitmapSize; 108 texture->id, texture 153 Texture* texture = mCache.get(bitmap->pixelRef()->getStableID()); local 195 Texture* texture = getCachedTexture(bitmap, AtlasUsageType::Use); local 203 Texture* texture = getCachedTexture(bitmap, atlasUsageType); local 255 generateTexture(const SkBitmap* bitmap, Texture* texture, bool regenerate) argument [all...] |
H A D | PathCache.cpp | 113 // will be applied later when compositing the alpha8 texture 179 void PathCache::operator()(PathDescription& entry, PathTexture*& texture) { argument 180 removeTexture(texture); 187 void PathCache::removeTexture(PathTexture* texture) { argument 188 if (texture) { 189 const uint32_t size = texture->width * texture->height; 193 const sp<Task<SkBitmap*> >& task = texture->task(); 196 texture->clearTask(); 201 ALOGE("Removing path texture o 251 PathTexture* texture = new PathTexture(Caches::getInstance(), local 259 generateTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture, bool addToCache) argument 282 generateTexture(SkBitmap& bitmap, Texture* texture) argument 320 PathTexture* texture = t->texture; local 376 PathTexture* texture = mCache.get(entry); local 411 PathTexture* texture = mCache.get(entry); local 453 PathTexture* texture = get(entry); local 475 PathTexture* texture = get(entry); local 496 PathTexture* texture = get(entry); local 519 PathTexture* texture = get(entry); local 546 PathTexture* texture = get(entry); local [all...] |
H A D | TextDropShadowCache.cpp | 152 void TextDropShadowCache::operator()(ShadowText&, ShadowTexture*& texture) { argument 153 if (texture) { 154 mSize -= texture->bitmapSize; 157 ALOGD("Shadow texture deleted, size = %d", texture->bitmapSize); 160 texture->deleteTexture(); 161 delete texture; 176 ShadowTexture* texture = mCache.get(entry); local 178 if (!texture) { 190 texture [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. 48 * Entry representing the texture and uvMapper of a PixelRef in the 54 * A "virtual texture" object that represents the texture 55 * this entry belongs to. This texture should never be 58 Texture* texture; member in class:android::uirenderer::AssetAtlas::Entry 61 * Maps texture coordinates in the [0..1] range into the 71 return texture->blend ? &atlas.mBlendKey : &atlas.mOpaqueKey; 85 Entry(SkPixelRef* pixelRef, Texture* texture, cons argument [all...] |
H A D | GradientCache.cpp | 111 void GradientCache::operator()(GradientCacheEntry&, Texture*& texture) { argument 112 if (texture) { 113 const uint32_t size = texture->width * texture->height * bytesPerPixel(); 116 texture->deleteTexture(); 117 delete texture; 127 Texture* texture = mCache.get(gradient); local 129 if (!texture) { 130 texture = addLinearGradient(gradient, colors, positions, count); 133 return texture; 169 Texture* texture = new Texture(Caches::getInstance()); local 234 generateTexture(uint32_t* colors, float* positions, Texture* texture) argument [all...] |
H A D | DeferredLayerUpdater.h | 58 ANDROID_API void setSurfaceTexture(const sp<GLConsumer>& texture, bool needsAttach) { argument 59 if (texture.get() != mSurfaceTexture.get()) { 61 mSurfaceTexture = texture; 63 GLenum target = texture->getCurrentTextureTarget();
|
H A D | Layer.cpp | 44 , texture(caches) 50 texture.width = layerWidth; 51 texture.height = layerHeight; 59 if (stencil || fbo || texture.id) { 184 if (texture.id) { 185 caches.textureState().bindTexture(renderTarget, texture.id); 196 if (!texture.id) { 197 glGenTextures(1, &texture.id); 202 if (texture.id) { 203 texture [all...] |
H A D | Layer.h | 55 * A layer has dimensions and is backed by an OpenGL texture or FBO. 90 * texture coordinates. 97 const float texX = 1.0f / float(texture.width); 98 const float texY = 1.0f / float(texture.height); 115 return texture.width; 119 return texture.height; 123 * Resize the layer and its texture if needed. 134 texture.width = width; 135 texture.height = height; 141 texture 368 Texture texture; member in class:android::uirenderer::Layer [all...] |
H A D | AssetAtlas.cpp | 76 entry->texture->id = mTexture->id; 91 return index >= 0 ? mEntries.valueAt(index)->texture : nullptr; 95 * Delegates changes to wrapping and filtering to the base atlas texture 136 Texture* texture = new DelegateTexture(caches, mTexture); local 137 texture->blend = !SkAlphaTypeIsOpaque(pixelRef->info().alphaType()); 138 texture->width = pixelRef->info().width(); 139 texture->height = pixelRef->info().height(); 141 Entry* entry = new Entry(pixelRef, texture, mapper, *this); 142 texture->uvMapper = &entry->uvMapper;
|
H A D | Glop.h | 115 Texture* texture; member in struct:android::uirenderer::Glop::Fill::TextureData 120 } texture; member in struct:android::uirenderer::Glop::Fill
|
H A D | PathCache.h | 59 * Alpha texture used to represent a path. 169 * Any texture added to the cache causing the cache to grow beyond the maximum 170 * allowed size will also cause the oldest texture to be kicked out. 181 void operator()(PathDescription& path, PathTexture*& texture) override; 243 * Generates the texture from a bitmap into the specified texture structure. 245 void generateTexture(SkBitmap& bitmap, Texture* texture); 246 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 287 PathTexture* texture; member in class:android::uirenderer::PathCache::PathTask [all...] |
H A D | Texture.h | 29 * Represents an OpenGL texture. 54 * Convenience method to call glDeleteTextures() on this texture's id. 59 * Name of the texture. 67 * Indicates whether the texture requires blending. 79 * Indicates whether this texture should be cleaned up after use. 87 * Indicates whether this texture will use trilinear filtering. 92 * Optional, pointer to a texture coordinates mapper. 104 * Last wrap modes set on this texture. 110 * Last filters set on this texture. 123 AutoTexture(const Texture* texture) 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;
|
/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/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...] |
/frameworks/native/services/surfaceflinger/RenderEngine/ |
H A D | Description.cpp | 62 void Description::setTexture(const Texture& texture) { argument 63 mTexture = texture;
|