| Index: gpu/command_buffer/service/texture_manager.h
|
| diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
|
| index 3ab546763f957f3c04820248b1400b6b87c6274a..21b189970fd7626953c319e4bd0cd300750c85a0 100644
|
| --- a/gpu/command_buffer/service/texture_manager.h
|
| +++ b/gpu/command_buffer/service/texture_manager.h
|
| @@ -231,6 +231,22 @@ class GPU_EXPORT Texture {
|
| GLenum type,
|
| bool cleared);
|
|
|
| + void SetCompressedLevelInfo(const FeatureInfo* feature_info,
|
| + GLenum target,
|
| + GLint level,
|
| + GLenum internal_format,
|
| + GLsizei width,
|
| + GLsizei height,
|
| + GLsizei depth,
|
| + GLint border,
|
| + GLsizei image_size,
|
| + bool cleared);
|
| +
|
| + void UpdateLevelInfo(Texture::LevelInfo& info,
|
| + const FeatureInfo* feature_info,
|
| + GLint level,
|
| + bool cleared);
|
| +
|
| // In GLES2 "texture complete" means it has all required mips for filtering
|
| // down to a 1x1 pixel texture, they are in the correct order, they are all
|
| // the same format.
|
| @@ -610,6 +626,17 @@ class GPU_EXPORT TextureManager {
|
| GLenum type,
|
| bool cleared);
|
|
|
| + void SetCompressedLevelInfo(TextureRef* ref,
|
| + GLenum target,
|
| + GLint level,
|
| + GLenum internal_format,
|
| + GLsizei width,
|
| + GLsizei height,
|
| + GLsizei depth,
|
| + GLint border,
|
| + GLsizei image_size,
|
| + bool cleared);
|
| +
|
| // Adapter to call above function.
|
| void SetLevelInfoFromParams(TextureRef* ref,
|
| const gpu::AsyncTexImage2DParams& params) {
|
| @@ -620,6 +647,15 @@ class GPU_EXPORT TextureManager {
|
| params.type, true /* cleared */);
|
| }
|
|
|
| + void SetCompressedLevelInfoFromParams(
|
| + TextureRef* ref,
|
| + const gpu::AsyncCompressedTexImage2DParams& params) {
|
| + SetCompressedLevelInfo(ref, params.target, params.level,
|
| + params.internal_format, params.width, params.height,
|
| + 1 /* depth */, params.border, params.image_size,
|
| + true /* cleared */);
|
| + }
|
| +
|
| Texture* Produce(TextureRef* ref);
|
|
|
| // Maps an existing texture into the texture manager, at a given client ID.
|
| @@ -773,6 +809,25 @@ class GPU_EXPORT TextureManager {
|
| DecoderFramebufferState* framebuffer_state,
|
| const DoTextImage2DArguments& args);
|
|
|
| + struct DoCompressedTexImage2DArguments {
|
| + GLenum target;
|
| + GLint level;
|
| + GLenum internal_format;
|
| + GLsizei width;
|
| + GLsizei height;
|
| + GLint border;
|
| + GLsizei image_size;
|
| + const void* pixels;
|
| + };
|
| +
|
| + bool ValidateCompressedTexImage2D(
|
| + ContextState* state,
|
| + const char* function_name,
|
| + const DoCompressedTexImage2DArguments& args,
|
| + // Pointer to TextureRef filled in if validation successful.
|
| + // Presumes the pointer is valid.
|
| + TextureRef** texture_ref);
|
| +
|
| // TODO(kloveless): Make GetTexture* private once this is no longer called
|
| // from gles2_cmd_decoder.
|
| TextureRef* GetTextureInfoForTarget(ContextState* state, GLenum target);
|
|
|