Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: gpu/command_buffer/service/texture_manager.h

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/image_factory.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « gpu/command_buffer/service/image_factory.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698