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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 7538008: Delete copy_texture_to_parent_texture from GPU command buffer code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder.cc (revision 95857)
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc (working copy)
@@ -1036,9 +1036,6 @@
// Wrapper for glValidateProgram.
void DoValidateProgram(GLuint program_client_id);
- void DoCopyTextureToParentTextureCHROMIUM(
- GLuint client_texture_id, GLuint parent_client_texture_id);
-
void DoResizeCHROMIUM(GLuint width, GLuint height);
void DoSetSurfaceCHROMIUM(GLint surface_id);
@@ -1285,8 +1282,6 @@
GLenum offscreen_target_stencil_format_;
GLsizei offscreen_target_samples_;
- GLuint copy_texture_to_parent_texture_fb_;
-
// The copy that is saved when SwapBuffers is called.
scoped_ptr<FrameBuffer> offscreen_saved_frame_buffer_;
scoped_ptr<Texture> offscreen_saved_color_texture_;
@@ -1680,7 +1675,6 @@
offscreen_target_depth_format_(0),
offscreen_target_stencil_format_(0),
offscreen_target_samples_(0),
- copy_texture_to_parent_texture_fb_(0),
offscreen_saved_color_format_(0),
back_buffer_color_format_(0),
back_buffer_has_depth_(false),
@@ -1934,8 +1928,6 @@
// Bind to the new default frame buffer (the offscreen target frame buffer).
// This should now be associated with ID zero.
DoBindFramebuffer(GL_FRAMEBUFFER, 0);
-
- glGenFramebuffersEXT(1, &copy_texture_to_parent_texture_fb_);
}
// OpenGL ES 2.0 implicitly enables the desktop GL capability
@@ -2456,9 +2448,6 @@
glDeleteBuffersARB(1, &fixed_attrib_buffer_id_);
}
- if (copy_texture_to_parent_texture_fb_)
- glDeleteFramebuffersEXT(1, &copy_texture_to_parent_texture_fb_);
-
if (offscreen_target_frame_buffer_.get())
offscreen_target_frame_buffer_->Destroy();
if (offscreen_target_color_texture_.get())
@@ -2572,37 +2561,6 @@
pending_offscreen_size_ = size;
}
-void GLES2DecoderImpl::DoCopyTextureToParentTextureCHROMIUM(
- GLuint client_texture_id,
- GLuint parent_client_texture_id) {
- if (parent_) {
- TextureManager::TextureInfo* texture = texture_manager()->GetTextureInfo(
- client_texture_id);
- TextureManager::TextureInfo* parent_texture =
- parent_->texture_manager()->GetTextureInfo(parent_client_texture_id);
- if (!texture || !parent_texture) {
- current_decoder_error_ = error::kInvalidArguments;
- return;
- }
- ScopedFrameBufferBinder fb_binder(this, copy_texture_to_parent_texture_fb_);
- glFramebufferTexture2DEXT(GL_FRAMEBUFFER,
- GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D,
- texture->service_id(),
- 0);
- ScopedTexture2DBinder tex_binder(this, parent_texture->service_id());
- GLsizei width, height;
- parent_texture->GetLevelSize(GL_TEXTURE_2D, 0, &width, &height);
- glCopyTexImage2D(GL_TEXTURE_2D,
- 0, // level
- GL_RGBA,
- 0, 0, // x, y
- width,
- height,
- 0); // border
- }
-}
-
void GLES2DecoderImpl::DoResizeCHROMIUM(GLuint width, GLuint height) {
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(TOUCH_UI)
// Make sure that we are done drawing to the back buffer before resizing.

Powered by Google App Engine
This is Rietveld 408576698