Commit af986e2d authored by tguilbert's avatar tguilbert Committed by Commit bot

Remove unused variables in StreamTexure

The changes in 8f2032ae remove the code
that used the variables that were used introduced in
f52b1e62.

This change removes those variables and the associated code in the
destructor.

BUG=640275
TEST=still builds.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2264403003
Cr-Commit-Position: refs/heads/master@{#414839}
parent ae8ec0cd
......@@ -7,7 +7,6 @@
#include <string.h>
#include "base/bind.h"
#include "base/strings/stringize_macros.h"
#include "gpu/command_buffer/service/context_group.h"
#include "gpu/command_buffer/service/context_state.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
......@@ -17,8 +16,6 @@
#include "gpu/ipc/service/gpu_channel.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_helper.h"
#include "ui/gl/scoped_binders.h"
#include "ui/gl/scoped_make_current.h"
namespace gpu {
......@@ -68,12 +65,6 @@ StreamTexture::StreamTexture(GpuCommandBufferStub* owner_stub,
route_id_(route_id),
has_listener_(false),
texture_id_(texture_id),
framebuffer_(0),
vertex_shader_(0),
fragment_shader_(0),
program_(0),
vertex_buffer_(0),
u_xform_location_(-1),
weak_factory_(this) {
owner_stub->AddDestructionObserver(this);
memset(current_matrix_, 0, sizeof(current_matrix_));
......@@ -103,23 +94,6 @@ void StreamTexture::OnWillDestroyStub() {
owner_stub_->RemoveDestructionObserver(this);
owner_stub_->channel()->RemoveRoute(route_id_);
if (framebuffer_) {
std::unique_ptr<ui::ScopedMakeCurrent> scoped_make_current(
MakeStubCurrent());
glDeleteProgram(program_);
glDeleteShader(vertex_shader_);
glDeleteShader(fragment_shader_);
glDeleteBuffersARB(1, &vertex_buffer_);
glDeleteFramebuffersEXT(1, &framebuffer_);
program_ = 0;
vertex_shader_ = 0;
fragment_shader_ = 0;
vertex_buffer_ = 0;
framebuffer_ = 0;
u_xform_location_ = -1;
}
owner_stub_ = NULL;
// If the owner goes away, there is no need to keep the SurfaceTexture around.
......
......@@ -98,13 +98,6 @@ class StreamTexture : public gpu::gles2::GLStreamTextureImage,
bool has_listener_;
uint32_t texture_id_;
unsigned framebuffer_;
unsigned vertex_shader_;
unsigned fragment_shader_;
unsigned program_;
unsigned vertex_buffer_;
int u_xform_location_;
base::WeakPtrFactory<StreamTexture> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(StreamTexture);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment