Commit d195bafa authored by senorblanco's avatar senorblanco Committed by Commit bot

cc: remove unused texture rect params, functions.

Looks like the target_rect param to BindFramebufferToTexture is now
unused. And it looks like UseScopedTexture is entirely unused.
Remove them both.

BUG=
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1633283002

Cr-Commit-Position: refs/heads/master@{#371632}
parent 16920f1d
...@@ -547,7 +547,7 @@ bool DirectRenderer::UseRenderPass(DrawingFrame* frame, ...@@ -547,7 +547,7 @@ bool DirectRenderer::UseRenderPass(DrawingFrame* frame,
} }
DCHECK(texture->id()); DCHECK(texture->id());
if (BindFramebufferToTexture(frame, texture, render_pass->output_rect)) { if (BindFramebufferToTexture(frame, texture)) {
InitializeViewport(frame, render_pass->output_rect, InitializeViewport(frame, render_pass->output_rect,
gfx::Rect(render_pass->output_rect.size()), gfx::Rect(render_pass->output_rect.size()),
render_pass->output_rect.size()); render_pass->output_rect.size());
......
...@@ -115,8 +115,7 @@ class CC_EXPORT DirectRenderer : public Renderer { ...@@ -115,8 +115,7 @@ class CC_EXPORT DirectRenderer : public Renderer {
virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0;
virtual bool BindFramebufferToTexture(DrawingFrame* frame, virtual bool BindFramebufferToTexture(DrawingFrame* frame,
const ScopedResource* resource, const ScopedResource* resource) = 0;
const gfx::Rect& target_rect) = 0;
virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0;
virtual void PrepareSurfaceForPass( virtual void PrepareSurfaceForPass(
DrawingFrame* frame, DrawingFrame* frame,
......
...@@ -2946,16 +2946,6 @@ void GLRenderer::GetFramebufferTexture(unsigned texture_id, ...@@ -2946,16 +2946,6 @@ void GLRenderer::GetFramebufferTexture(unsigned texture_id,
gl_->BindTexture(GL_TEXTURE_2D, 0); gl_->BindTexture(GL_TEXTURE_2D, 0);
} }
bool GLRenderer::UseScopedTexture(DrawingFrame* frame,
const ScopedResource* texture,
const gfx::Rect& viewport_rect) {
DCHECK(texture->id());
frame->current_render_pass = NULL;
frame->current_texture = texture;
return BindFramebufferToTexture(frame, texture, viewport_rect);
}
void GLRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { void GLRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) {
current_framebuffer_lock_ = nullptr; current_framebuffer_lock_ = nullptr;
output_surface_->BindFramebuffer(); output_surface_->BindFramebuffer();
...@@ -2969,8 +2959,7 @@ void GLRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { ...@@ -2969,8 +2959,7 @@ void GLRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) {
} }
bool GLRenderer::BindFramebufferToTexture(DrawingFrame* frame, bool GLRenderer::BindFramebufferToTexture(DrawingFrame* frame,
const ScopedResource* texture, const ScopedResource* texture) {
const gfx::Rect& target_rect) {
DCHECK(texture->id()); DCHECK(texture->id());
// Explicitly release lock, otherwise we can crash when try to lock // Explicitly release lock, otherwise we can crash when try to lock
......
...@@ -102,8 +102,7 @@ class CC_EXPORT GLRenderer : public DirectRenderer { ...@@ -102,8 +102,7 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
void BindFramebufferToOutputSurface(DrawingFrame* frame) override; void BindFramebufferToOutputSurface(DrawingFrame* frame) override;
bool BindFramebufferToTexture(DrawingFrame* frame, bool BindFramebufferToTexture(DrawingFrame* frame,
const ScopedResource* resource, const ScopedResource* resource) override;
const gfx::Rect& target_rect) override;
void SetScissorTestRect(const gfx::Rect& scissor_rect) override; void SetScissorTestRect(const gfx::Rect& scissor_rect) override;
void PrepareSurfaceForPass(DrawingFrame* frame, void PrepareSurfaceForPass(DrawingFrame* frame,
SurfaceInitializationMode initialization_mode, SurfaceInitializationMode initialization_mode,
...@@ -236,10 +235,6 @@ class CC_EXPORT GLRenderer : public DirectRenderer { ...@@ -236,10 +235,6 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
int matrix_location); int matrix_location);
void SetUseProgram(unsigned program); void SetUseProgram(unsigned program);
bool UseScopedTexture(DrawingFrame* frame,
const ScopedResource* resource,
const gfx::Rect& viewport_rect);
bool MakeContextCurrent(); bool MakeContextCurrent();
void InitializeSharedObjects(); void InitializeSharedObjects();
......
...@@ -143,8 +143,7 @@ void SoftwareRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { ...@@ -143,8 +143,7 @@ void SoftwareRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) {
bool SoftwareRenderer::BindFramebufferToTexture( bool SoftwareRenderer::BindFramebufferToTexture(
DrawingFrame* frame, DrawingFrame* frame,
const ScopedResource* texture, const ScopedResource* texture) {
const gfx::Rect& target_rect) {
DCHECK(texture->id()); DCHECK(texture->id());
// Explicitly release lock, otherwise we can crash when try to lock // Explicitly release lock, otherwise we can crash when try to lock
......
...@@ -43,8 +43,7 @@ class CC_EXPORT SoftwareRenderer : public DirectRenderer { ...@@ -43,8 +43,7 @@ class CC_EXPORT SoftwareRenderer : public DirectRenderer {
protected: protected:
void BindFramebufferToOutputSurface(DrawingFrame* frame) override; void BindFramebufferToOutputSurface(DrawingFrame* frame) override;
bool BindFramebufferToTexture(DrawingFrame* frame, bool BindFramebufferToTexture(DrawingFrame* frame,
const ScopedResource* texture, const ScopedResource* texture) override;
const gfx::Rect& target_rect) override;
void SetScissorTestRect(const gfx::Rect& scissor_rect) override; void SetScissorTestRect(const gfx::Rect& scissor_rect) override;
void PrepareSurfaceForPass(DrawingFrame* frame, void PrepareSurfaceForPass(DrawingFrame* frame,
SurfaceInitializationMode initialization_mode, SurfaceInitializationMode initialization_mode,
......
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