diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 01:53:33 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 01:53:33 +0000 |
commit | 99c83dfbc7fb356682e1d26ab50884456caf6c40 (patch) | |
tree | ec1c484bba83a7de5d4b087c85b73c7e48532840 | |
parent | 82ce4b8b4bfd42c3a9c6b10d88aa411560f3bdc4 (diff) | |
download | chromium_src-99c83dfbc7fb356682e1d26ab50884456caf6c40.zip chromium_src-99c83dfbc7fb356682e1d26ab50884456caf6c40.tar.gz chromium_src-99c83dfbc7fb356682e1d26ab50884456caf6c40.tar.bz2 |
Remove some dead code found by scythe.
No functionality change.
BUG=
R=piman@chromium.org
Review URL: https://codereview.chromium.org/138313006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245054 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 64 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder_mock.h | 1 |
3 files changed, 0 insertions, 69 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 36259a3..6378bdc 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -386,10 +386,6 @@ class BackTexture { return size_; } - size_t estimated_size() const { - return memory_tracker_.GetMemRepresented(); - } - private: MemoryTypeTracker memory_tracker_; ContextState* state_; @@ -429,10 +425,6 @@ class BackRenderbuffer { return id_; } - size_t estimated_size() const { - return memory_tracker_.GetMemRepresented(); - } - private: RenderbufferManager* renderbuffer_manager_; MemoryTypeTracker memory_tracker_; @@ -484,9 +476,6 @@ struct FenceCallback { : fence(gfx::GLFence::Create()) { DCHECK(fence); } - void AddCallback(base::Closure cb) { - callbacks.push_back(cb); - } std::vector<base::Closure> callbacks; scoped_ptr<gfx::GLFence> fence; }; @@ -547,7 +536,6 @@ class GLES2DecoderImpl : public GLES2Decoder, virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) OVERRIDE; void UpdateParentTextureInfo(); virtual bool MakeCurrent() OVERRIDE; - virtual void ReleaseCurrent() OVERRIDE; virtual GLES2Util* GetGLES2Util() OVERRIDE { return &util_; } virtual gfx::GLContext* GetGLContext() OVERRIDE { return context_.get(); } virtual ContextGroup* GetContextGroup() OVERRIDE { return group_.get(); } @@ -572,9 +560,6 @@ class GLES2DecoderImpl : public GLES2Decoder, virtual void RestoreProgramBindings() const OVERRIDE { state_.RestoreProgramBindings(); } - virtual void RestoreRenderbufferBindings() const OVERRIDE { - state_.RestoreRenderbufferBindings(); - } virtual void RestoreTextureUnitBindings(unsigned unit) const OVERRIDE { state_.RestoreTextureUnitBindings(unit); } @@ -1071,10 +1056,6 @@ class GLES2DecoderImpl : public GLES2Decoder, // Clear any textures used by the current program. bool ClearUnclearedTextures(); - // Clear any uncleared level in texture. - // Returns false if there was a generated GL error. - bool ClearTexture(Texture* texture); - // Clears any uncleared attachments attached to the given frame buffer. // Returns false if there was a generated GL error. void ClearUnclearedAttachments(GLenum target, Framebuffer* framebuffer); @@ -1495,10 +1476,6 @@ class GLES2DecoderImpl : public GLES2Decoder, error::Error* error, GLint* real_location, GLuint* service_id, void** result, GLenum* result_type); - // Computes the estimated memory used for the backbuffer and passes it to - // the tracing system. - size_t GetBackbufferMemoryTotal(); - virtual bool WasContextLost() OVERRIDE; virtual bool WasContextLostByRobustnessExtension() OVERRIDE; virtual void LoseContext(uint32 reset_status) OVERRIDE; @@ -1507,13 +1484,6 @@ class GLES2DecoderImpl : public GLES2Decoder, void ReleaseIOSurfaceForTexture(GLuint texture_id); #endif - // Validates the combination of texture parameters. For example validates that - // for a given format the specific type, level and targets are valid. - // Synthesizes the correct GL error if invalid. Returns true if valid. - bool ValidateTextureParameters( - const char* function_name, - GLenum target, GLenum format, GLenum type, GLint level); - bool ValidateCompressedTexDimensions( const char* function_name, GLint level, GLsizei width, GLsizei height, GLenum format); @@ -2918,11 +2888,6 @@ void GLES2DecoderImpl::ProcessFinishedAsyncTransfers() { async_pixel_transfer_manager_->BindCompletedAsyncTransfers(); } -void GLES2DecoderImpl::ReleaseCurrent() { - if (context_.get()) - context_->ReleaseCurrent(surface_.get()); -} - static void RebindCurrentFramebuffer( GLenum target, Framebuffer* framebuffer, @@ -3375,35 +3340,6 @@ bool GLES2DecoderImpl::ProduceFrontBuffer(const Mailbox& mailbox) { GL_TEXTURE_2D, name, offscreen_saved_color_texture_info_->texture()); } -size_t GLES2DecoderImpl::GetBackbufferMemoryTotal() { - size_t total = 0; - if (offscreen_target_frame_buffer_.get()) { - if (offscreen_target_color_texture_.get()) { - total += offscreen_target_color_texture_->estimated_size(); - } - if (offscreen_target_color_render_buffer_.get()) { - total += offscreen_target_color_render_buffer_->estimated_size(); - } - if (offscreen_target_depth_render_buffer_.get()) { - total += offscreen_target_depth_render_buffer_->estimated_size(); - } - if (offscreen_target_stencil_render_buffer_.get()) { - total += offscreen_target_stencil_render_buffer_->estimated_size(); - } - if (offscreen_saved_color_texture_.get()) { - total += offscreen_saved_color_texture_->estimated_size(); - } - if (offscreen_resolved_color_texture_.get()) { - total += offscreen_resolved_color_texture_->estimated_size(); - } - } else { - gfx::Size size = surface_->GetSize(); - total += size.width() * size.height() * - GLES2Util::RenderbufferBytesPerPixel(back_buffer_color_format_); - } - return total; -} - bool GLES2DecoderImpl::ResizeOffscreenFrameBuffer(const gfx::Size& size) { bool is_offscreen = !!offscreen_target_frame_buffer_.get(); if (!is_offscreen) { diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h index f723d14d..3a8bf7f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder.h @@ -125,9 +125,6 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, // Make this decoder's GL context current. virtual bool MakeCurrent() = 0; - // Have the decoder release the context. - virtual void ReleaseCurrent() = 0; - // Gets the GLES2 Util which holds info. virtual GLES2Util* GetGLES2Util() = 0; @@ -150,7 +147,6 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, virtual void RestoreFramebufferBindings() const = 0; virtual void RestoreGlobalState() const = 0; virtual void RestoreProgramBindings() const = 0; - virtual void RestoreRenderbufferBindings() const = 0; virtual void RestoreTextureState(unsigned service_id) const = 0; virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h index f52c221..edec2a0 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h @@ -46,7 +46,6 @@ class MockGLES2Decoder : public GLES2Decoder { MOCK_METHOD1(ProduceFrontBuffer, bool(const Mailbox& mailbox)); MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); MOCK_METHOD0(MakeCurrent, bool()); - MOCK_METHOD0(ReleaseCurrent, void()); MOCK_METHOD1(GetServiceIdForTesting, uint32(uint32 client_id)); MOCK_METHOD0(GetGLES2Util, GLES2Util*()); MOCK_METHOD0(GetGLSurface, gfx::GLSurface*()); |