Searched refs:texture (Results 1 - 25 of 129) sorted by relevance

123456

/frameworks/base/libs/hwui/renderstate/
H A DTextureState.cpp32 // Must define as many texture units as specified by kTextureUnitsCount
48 "At least %d texture units are required!", kTextureUnitsCount);
63 * This is used to populate the shadow LUT texture for quick lookup in the
89 "Tried to use texture unit index %d, only %d exist",
101 void TextureState::bindTexture(GLuint texture) { argument
102 if (mBoundTextures[mTextureUnit] != texture) {
103 glBindTexture(GL_TEXTURE_2D, texture);
104 mBoundTextures[mTextureUnit] = texture;
108 void TextureState::bindTexture(GLenum target, GLuint texture) { argument
110 bindTexture(texture);
119 deleteTexture(GLuint texture) argument
144 unbindTexture(GLuint texture) argument
[all...]
H A DTextureState.h38 * Activate the specified texture unit. The texture unit must
44 * Invalidate the cached value of the active texture unit.
49 * Binds the specified texture as a GL_TEXTURE_2D texture.
50 * All texture bindings must be performed with this method or
53 void bindTexture(GLuint texture);
56 * Binds the specified texture with the specified render target.
57 * All texture bindings must be performed with this method or
60 void bindTexture(GLenum target, GLuint texture);
[all...]
H A DRenderState.cpp301 // texture
302 if (fill.texture.texture != nullptr) {
303 const Glop::Fill::TextureData& texture = fill.texture; local
304 // texture always takes slot 0, shader samplers increment from there
307 mCaches->textureState().bindTexture(texture.target, texture.texture->id());
308 if (texture
346 Texture* texture = (fill.skiaShaderData.skiaShaderType & kBitmap_SkiaShaderType) ? local
[all...]
H A DOffscreenBufferPool.cpp42 , texture(caches) {
47 texture.resize(width, height, GL_RGBA);
48 texture.blend = true;
49 texture.setWrap(GL_CLAMP_TO_EDGE);
50 // not setting filter on texture, since it's set when drawing, based on transform
54 const float texX = 1.0f / static_cast<float>(texture.width());
55 const float texY = 1.0f / static_cast<float>(texture.height());
76 const float texX = 1.0f / float(texture.width());
77 const float texY = 1.0f / float(texture.height());
106 ATRACE_FORMAT("Destroy %ux%u HW Layer", texture
[all...]
/frameworks/base/libs/hwui/tests/unit/
H A DGradientCacheTests.cpp33 Texture* texture = cache.get(colors, positions, 3); local
34 ASSERT_TRUE(texture);
35 ASSERT_FALSE(texture->cleanup);
36 ASSERT_EQ((uint32_t) texture->objectSize(), cache.getSize());
H A DTextDropShadowCacheTests.cpp47 ShadowTexture* texture = cache.get(&paint, glyphs.data(), glyphs.size(), 10, positions.data()); local
49 ASSERT_TRUE(texture);
50 ASSERT_FALSE(texture->cleanup);
51 ASSERT_EQ((uint32_t) texture->objectSize(), cache.getSize());
H A DGlopBuilderTests.cpp46 EXPECT_EQ(expectedFill.texture.clamp, builtFill.texture.clamp);
47 EXPECT_EQ(expectedFill.texture.filter, builtFill.texture.filter);
48 EXPECT_EQ(expectedFill.texture.target, builtFill.texture.target);
49 EXPECT_EQ(expectedFill.texture.textureTransform, builtFill.texture.textureTransform);
114 glop->fill.texture = { nullptr, GL_INVALID_ENUM, GL_INVALID_ENUM, GL_INVALID_ENUM, nullptr };
145 goldenGlop->fill.texture
[all...]
/frameworks/base/libs/hwui/
H A DTextureCache.cpp44 INIT_LOGD(" Maximum texture dimension is %d pixels", mMaxTextureSize);
69 void TextureCache::operator()(uint32_t&, Texture*& texture) { argument
71 if (texture) {
72 mSize -= texture->bitmapSize;
74 texture->id, texture->bitmapSize, mSize);
76 ALOGD("Texture deleted, size = %d", texture->bitmapSize);
78 texture->deleteTexture();
79 delete texture;
102 ALOGW("Bitmap too large to be uploaded into a texture (
119 Texture* texture = mCache.get(bitmap->pixelRef()->getStableID()); local
163 Texture* texture = getCachedTexture(bitmap, AtlasUsageType::Use); local
175 Texture* texture = getCachedTexture(bitmap, atlasUsageType); local
[all...]
H A DPathCache.cpp156 // will be applied later when compositing the alpha8 texture
215 void PathCache::operator()(PathDescription& entry, PathTexture*& texture) { argument
216 removeTexture(texture);
223 void PathCache::removeTexture(PathTexture* texture) { argument
224 if (texture) {
225 const uint32_t size = texture->width() * texture->height();
229 const sp<Task<SkBitmap*> >& task = texture->task();
232 texture->clearTask();
237 ALOGE("Removing path texture o
285 PathTexture* texture = new PathTexture(Caches::getInstance(), local
292 generateTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture, bool addToCache) argument
315 generateTexture(SkBitmap& bitmap, Texture* texture) argument
337 PathTexture* texture = t->texture; local
386 PathTexture* texture = mCache.get(entry); local
427 PathTexture* texture = mCache.get(entry); local
469 PathTexture* texture = get(entry); local
491 PathTexture* texture = get(entry); local
512 PathTexture* texture = get(entry); local
535 PathTexture* texture = get(entry); local
562 PathTexture* texture = get(entry); local
[all...]
H A DTextDropShadowCache.cpp127 void TextDropShadowCache::operator()(ShadowText&, ShadowTexture*& texture) { argument
128 if (texture) {
129 mSize -= texture->objectSize();
132 ALOGD("Shadow texture deleted, size = %d", texture->bitmapSize);
135 texture->deleteTexture();
136 delete texture;
151 ShadowTexture* texture = mCache.get(entry); local
153 if (!texture) {
165 texture
[all...]
H A DGpuMemoryTracker.cpp125 const Texture* texture = static_cast<Texture*>(obj); local
126 if (texture->cleanup) {
127 ALOGE("Leaked texture marked for cleanup! id=%u, size %ux%u",
128 texture->id(), texture->width(), texture->height());
129 freeList.push_back(texture);
133 for (auto& texture : freeList) {
134 const_cast<Texture*>(texture)->deleteTexture();
135 delete texture;
[all...]
H A DAssetAtlas.h39 * texture. Each bitmap is associated with a location, defined in pixels,
41 * an external texture using the EGLImageKHR extension.
46 * Entry representing the texture and uvMapper of a PixelRef in the
52 * A "virtual texture" object that represents the texture
53 * this entry belongs to. This texture should never be
56 Texture* texture; member in class:android::uirenderer::AssetAtlas::Entry
59 * Maps texture coordinates in the [0..1] range into the
69 return texture->blend ? &atlas.mBlendKey : &atlas.mOpaqueKey;
73 delete texture;
87 Entry(SkPixelRef* pixelRef, Texture* texture, const UvMapper& mapper, const AssetAtlas& atlas) argument
[all...]
H A DTexture.h33 * Represents an OpenGL texture.
61 * Convenience method to call glDeleteTextures() on this texture's id.
66 * Sets the width, height, and format of the texture along with allocating
67 * the texture ID. Does nothing if the width, height, and format are already
92 * Wraps an existing texture.
117 * Indicates whether the texture requires blending.
121 * Indicates whether this texture should be cleaned up after use.
129 * Indicates whether this texture will use trilinear filtering.
134 * Optional, pointer to a texture coordinates mapper.
147 // and external texture wrappe
174 AutoTexture(Texture* texture) argument
183 Texture* const texture; member in class:android::uirenderer::AutoTexture
[all...]
H A DGradientCache.cpp96 void GradientCache::operator()(GradientCacheEntry&, Texture*& texture) { argument
97 if (texture) {
98 mSize -= texture->objectSize();
99 texture->deleteTexture();
100 delete texture;
110 Texture* texture = mCache.get(gradient); local
112 if (!texture) {
113 texture = addLinearGradient(gradient, colors, positions, count);
116 return texture;
152 Texture* texture local
222 generateTexture(uint32_t* colors, float* positions, const uint32_t width, const uint32_t height, Texture* texture) argument
[all...]
H A DDeferredLayerUpdater.h61 ANDROID_API void setSurfaceTexture(const sp<GLConsumer>& texture, bool needsAttach) { argument
62 if (texture.get() != mSurfaceTexture.get()) {
64 mSurfaceTexture = texture;
66 GLenum target = texture->getCurrentTextureTarget();
H A DLayer.cpp43 , texture(caches)
49 texture.mWidth = layerWidth;
50 texture.mHeight = layerHeight;
58 if (stencil || fbo || texture.mId) {
60 texture.deleteTexture();
68 texture.deleteTexture();
182 if (texture.mId) {
183 caches.textureState().bindTexture(renderTarget, texture.mId);
194 if (!texture.mId) {
195 glGenTextures(1, &texture
[all...]
H A DAssetAtlas.cpp71 return result != mEntries.end() ? result->second->texture : nullptr;
75 * Delegates changes to wrapping and filtering to the base atlas texture
117 Texture* texture = new DelegateTexture(caches, mTexture); local
118 texture->blend = !SkAlphaTypeIsOpaque(pixelRef->info().alphaType());
119 texture->wrap(mTexture->id(), pixelRef->info().width(),
122 std::unique_ptr<Entry> entry(new Entry(pixelRef, texture, mapper, *this));
123 texture->uvMapper = &entry->uvMapper;
H A DLayer.h56 * A layer has dimensions and is backed by an OpenGL texture or FBO.
91 * texture coordinates.
98 const float texX = 1.0f / float(texture.mWidth);
99 const float texY = 1.0f / float(texture.mHeight);
116 return texture.mWidth;
120 return texture.mHeight;
124 * Resize the layer and its texture if needed.
135 texture.updateSize(width, height, texture.format());
141 texture
371 Texture texture; member in class:android::uirenderer::Layer
[all...]
H A DGlopBuilder.cpp257 || (mOutGlop->fill.texture.texture && mOutGlop->fill.texture.texture->blend)
324 GlopBuilder& GlopBuilder::setFillTexturePaint(Texture& texture, argument
331 mOutGlop->fill.texture = { &texture,
351 || texture.blend
374 mOutGlop->fill.texture = {
377 mOutGlop->fill.texture
407 setFillShadowTexturePaint(ShadowTexture& texture, int shadowColor, const SkPaint& paint, float alphaScale) argument
451 setFillLayer(Texture& texture, const SkColorFilter* colorFilter, float alpha, SkXfermode::Mode mode, Blend::ModeOrderSwap modeUsage) argument
[all...]
H A DBakedOpDispatcher.cpp52 Texture* texture = entry ? entry->texture : renderer.caches().textureCache.get(bitmap); local
53 if (!texture) return;
54 const AutoTexture autoCleanup(texture);
65 // calculate unclipped bounds, since they'll determine texture coordinates
82 .setFillTexturePaint(*texture, textureFillFlags, firstState.op->paint, firstState.alpha)
175 Texture* texture = entry ? entry->texture : renderer.caches().textureCache.get(firstOp.bitmap); local
176 if (!texture) return;
177 const AutoTexture autoCleanup(texture);
211 ShadowTexture* texture = renderer.caches().dropShadowCache.get( local
374 renderPathTexture(BakedOpRenderer& renderer, const BakedOpState& state, float xOffset, float yOffset, PathTexture& texture, const SkPaint& paint) argument
404 PathTexture* texture = renderer.caches().pathCache.getArc( local
427 Texture* texture = renderer.getTexture(op.bitmap); local
460 Texture* texture = renderer.renderState().assetAtlas().getEntryTexture(op.bitmap->pixelRef()); local
519 Texture* texture = renderer.getTexture(op.bitmap); local
573 PathTexture* texture = renderer.caches().pathCache.getOval( local
607 Texture* texture = entry ? entry->texture : renderer.caches().textureCache.get(op.bitmap); local
624 PathTexture* texture = renderer.caches().pathCache.get(op.path, op.paint); local
651 PathTexture* texture = renderer.caches().pathCache.getRect( local
685 PathTexture* texture = renderer.caches().pathCache.getRoundRect( local
[all...]
/frameworks/base/libs/hwui/font/
H A DFontCacheHistoryTracker.cpp26 log.appendFormat("glyph (texture %p, position: (%d, %d), size: %dx%d, gen: %d)", glyph.texture,
42 log.appendFormat(" cleared cachetexture %p in gen %d\n", glyph.texture,
66 entry.glyph.texture = glyphInfo->mCacheTexture;
75 void FontCacheHistoryTracker::glyphUploaded(CacheTexture* texture, uint32_t x, uint32_t y, argument
79 glyph.texture = texture;
86 void FontCacheHistoryTracker::glyphsCleared(CacheTexture* texture) { argument
89 glyph.texture = texture;
[all...]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/
H A DGLCanvas.java92 // 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 DGLES20Canvas.java153 // 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 DAlpha8BitmapActivity.java49 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/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
H A DTransformUtils.java67 TextureSource texture = frame.lockTextureSource();
68 texture.generateMipmaps();
73 TextureSource texture = frame.lockTextureSource();
74 texture.setParameter(param, value);

Completed in 310 milliseconds

123456