Lines Matching refs:width
86 bool Texture::updateSize(uint32_t width, uint32_t height, GLint format) {
87 if (mWidth == width && mHeight == height && mFormat == format) {
90 mWidth = width;
104 void Texture::upload(GLint internalformat, uint32_t width, uint32_t height,
107 bool needsAlloc = updateSize(width, height, internalformat);
125 GLsizei width, GLsizei height, const GLvoid * data) {
127 const bool useStride = stride != width
129 if ((stride == width) || useStride) {
135 glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, type, data);
137 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, format, type, data);
145 // if the stride doesn't match the width
147 GLvoid * temp = (GLvoid *) malloc(width * height * bpp);
153 memcpy(pDst, pSrc, width * bpp);
154 pDst += width * bpp;
159 glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, type, temp);
161 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, format, type, temp);
171 bitmap.width(), bitmap.height(), bitmap.getPixels());
210 ATRACE_FORMAT("Upload %ux%u Texture", bitmap.width(), bitmap.height());
230 if (updateSize(bitmap.width(), bitmap.height(), format)) {
265 void Texture::wrap(GLuint id, uint32_t width, uint32_t height, GLint format) {
267 mWidth = width;