Lines Matching refs:texture
871 * texture. Unfortunately, this is inefficient as it requires every primitive to
885 * a layer is created, only a texture is created, not an FBO. The content of the
886 * frame buffer contained within the layer's bounds is copied into this texture
891 * To compose the layers back onto the frame buffer, each layer texture
959 // Unfortunately some drivers will turn the entire target texture black
993 // Bind texture to FBO
997 // Initialize the texture if needed
1043 // Detach the texture from the FBO
1125 setupDrawMesh(&mMeshVertices[0].position[0], &mMeshVertices[0].texture[0]);
1158 &mMeshVertices[0].position[0], &mMeshVertices[0].texture[0],
1239 setupDrawMeshIndices(&mesh[0].position[0], &mesh[0].texture[0]);
1948 void OpenGLRenderer::setupDrawTexture(GLuint texture) {
1949 if (texture) bindTexture(texture);
1954 void OpenGLRenderer::setupDrawExternalTexture(GLuint texture) {
1955 bindExternalTexture(texture);
2063 void OpenGLRenderer::drawAlphaBitmap(Texture* texture, float left, float top, SkPaint* paint) {
2073 texture->setWrap(GL_CLAMP_TO_EDGE, true);
2081 texture->setFilter(GL_NEAREST, true);
2083 texture->setFilter(FILTER(paint), true);
2086 // No need to check for a UV mapper on the texture object, only ARGB_8888
2088 drawAlpha8TextureMesh(x, y, x + texture->width, y + texture->height, texture->id,
2101 Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap);
2102 if (!texture) return DrawGlInfo::kStatusDone;
2104 const AutoTexture autoCleanup(texture);
2110 texture->setWrap(GL_CLAMP_TO_EDGE, true);
2111 texture->setFilter(pureTranslate ? GL_NEAREST : FILTER(paint), true);
2118 texture->id, paint != NULL, color, alpha, mode,
2119 &vertices[0].position[0], &vertices[0].texture[0],
2123 texture->id, alpha / 255.0f, mode, texture->blend,
2124 &vertices[0].position[0], &vertices[0].texture[0],
2140 Texture* texture = getTexture(bitmap);
2141 if (!texture) return DrawGlInfo::kStatusDone;
2142 const AutoTexture autoCleanup(texture);
2145 drawAlphaBitmap(texture, left, top, paint);
2147 drawTextureRect(left, top, right, bottom, texture, paint);
2163 Texture* texture = getTexture(bitmap);
2164 if (!texture) return DrawGlInfo::kStatusDone;
2165 const AutoTexture autoCleanup(texture);
2172 drawAlphaBitmap(texture, 0.0f, 0.0f, paint);
2174 drawTextureRect(0.0f, 0.0f, bitmap->width(), bitmap->height(), texture, paint);
2190 Texture* texture = mCaches.textureCache.getTransient(bitmap);
2191 const AutoTexture autoCleanup(texture);
2194 drawAlphaBitmap(texture, left, top, paint);
2196 drawTextureRect(left, top, right, bottom, texture, paint);
2230 Texture* texture = mCaches.assetAtlas.getEntryTexture(bitmap);
2231 const UvMapper& mapper(getMapper(texture));
2273 if (!texture) {
2274 texture = mCaches.textureCache.get(bitmap);
2275 if (!texture) {
2280 const AutoTexture autoCleanup(texture);
2282 texture->setWrap(GL_CLAMP_TO_EDGE, true);
2283 texture->setFilter(FILTER(paint), true);
2303 setupDrawTexture(texture->id);
2306 setupDrawMesh(&mesh[0].position[0], &mesh[0].texture[0], &mesh[0].color[0]);
2329 Texture* texture = getTexture(bitmap);
2330 if (!texture) return DrawGlInfo::kStatusDone;
2331 const AutoTexture autoCleanup(texture);
2333 const float width = texture->width;
2334 const float height = texture->height;
2341 getMapper(texture).map(u1, v1, u2, v2);
2350 texture->setWrap(GL_CLAMP_TO_EDGE, true);
2372 texture->setFilter(scaled ? FILTER(paint) : GL_NEAREST, true);
2375 texture->setFilter(FILTER(paint), true);
2393 texture->id, paint != NULL, color, alpha, mode,
2394 &mMeshVertices[0].position[0], &mMeshVertices[0].texture[0],
2398 texture->id, alpha / 255.0f, mode, texture->blend,
2399 &mMeshVertices[0].position[0], &mMeshVertices[0].texture[0],
2433 Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap);
2434 if (!texture) return DrawGlInfo::kStatusDone;
2435 const AutoTexture autoCleanup(texture);
2437 texture->setWrap(GL_CLAMP_TO_EDGE, true);
2438 texture->setFilter(GL_LINEAR, true);
2469 drawIndexedTextureMesh(x, y, right, bottom, texture->id, alpha / 255.0f,
2470 mode, texture->blend, (GLvoid*) mesh->offset, (GLvoid*) mesh->textureOffset,
2474 drawIndexedTextureMesh(left, top, right, bottom, texture->id, alpha / 255.0f,
2475 mode, texture->blend, (GLvoid*) mesh->offset, (GLvoid*) mesh->textureOffset,
2492 Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap);
2493 if (!texture) return DrawGlInfo::kStatusDone;
2494 const AutoTexture autoCleanup(texture);
2496 texture->setWrap(GL_CLAMP_TO_EDGE, true);
2497 texture->setFilter(GL_LINEAR, true);
2503 drawIndexedTextureMesh(0.0f, 0.0f, 1.0f, 1.0f, texture->id, alpha / 255.0f,
2504 mode, texture->blend, &vertices[0].position[0], &vertices[0].texture[0],
2643 status_t OpenGLRenderer::drawShape(float left, float top, const PathTexture* texture,
2645 if (!texture) return DrawGlInfo::kStatusDone;
2646 const AutoTexture autoCleanup(texture);
2648 const float x = left + texture->left - texture->offset;
2649 const float y = top + texture->top - texture->offset;
2651 drawPathTexture(texture, x, y, paint);
2665 const PathTexture* texture = mCaches.pathCache.getRoundRect(
2667 return drawShape(left, top, texture, p);
2690 const PathTexture* texture = mCaches.pathCache.getCircle(radius, p);
2691 return drawShape(x - radius, y - radius, texture, p);
2712 const PathTexture* texture = mCaches.pathCache.getOval(right - left, bottom - top, p);
2713 return drawShape(left, top, texture, p);
2739 const PathTexture* texture = mCaches.pathCache.getArc(right - left, bottom - top,
2741 return drawShape(left, top, texture, p);
2774 const PathTexture* texture =
2776 return drawShape(left, top, texture, p);
2808 // If the drop shadow exceeds the max texture size or couldn't be
2877 // Pick the appropriate texture filtering
2971 // Pick the appropriate texture filtering
3045 const PathTexture* texture = mCaches.pathCache.get(path, paint);
3046 if (!texture) return DrawGlInfo::kStatusDone;
3047 const AutoTexture autoCleanup(texture);
3049 const float x = texture->left - texture->offset;
3050 const float y = texture->top - texture->offset;
3052 drawPathTexture(texture, x, y, paint);
3124 setupDrawMeshIndices(&mesh[0].position[0], &mesh[0].texture[0]);
3236 Texture* texture = mCaches.assetAtlas.getEntryTexture(bitmap);
3237 if (!texture) {
3240 return texture;
3243 void OpenGLRenderer::drawPathTexture(const PathTexture* texture,
3245 if (quickReject(x, y, x + texture->width, y + texture->height)) {
3260 setupDrawModelView(x, y, x + texture->width, y + texture->height);
3261 setupDrawTexture(texture->id);
3416 Texture* texture, SkPaint* paint) {
3421 texture->setWrap(GL_CLAMP_TO_EDGE, true);
3426 if (texture->uvMapper) {
3428 texCoords = &mMeshVertices[0].texture[0];
3431 texture->uvMapper->map(uvs);
3440 texture->setFilter(GL_NEAREST, true);
3441 drawTextureMesh(x, y, x + texture->width, y + texture->height, texture->id,
3442 alpha / 255.0f, mode, texture->blend, vertices, texCoords,
3445 texture->setFilter(FILTER(paint), true);
3446 drawTextureMesh(left, top, right, bottom, texture->id, alpha / 255.0f, mode,
3447 texture->blend, vertices, texCoords, GL_TRIANGLE_STRIP, gMeshCount);
3450 if (texture->uvMapper) {
3456 GLuint texture, float alpha, SkXfermode::Mode mode, bool blend) {
3457 drawTextureMesh(left, top, right, bottom, texture, alpha, mode, blend,
3462 GLuint texture, float alpha, SkXfermode::Mode mode, bool blend,
3478 setupDrawTexture(texture);
3487 GLuint texture, float alpha, SkXfermode::Mode mode, bool blend,
3503 setupDrawTexture(texture);
3512 GLuint texture, bool hasColor, int color, int alpha, SkXfermode::Mode mode,
3531 setupDrawTexture(texture);