Chromium Code Reviews| Index: ui/gfx/compositor/compositor_gl.cc |
| diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc |
| index 6e1e65160f90ab50da4cf374b41042b54fd6b385..db0618f203e419e86b5ca19157389ce6adb7e756 100644 |
| --- a/ui/gfx/compositor/compositor_gl.cc |
| +++ b/ui/gfx/compositor/compositor_gl.cc |
| @@ -336,13 +336,17 @@ void TextureGL::Draw(const ui::TextureDrawParams& params) { |
| } |
| void TextureGL::Draw(const ui::TextureDrawParams& params, |
| - const gfx::Rect& clip_bounds) { |
| + const gfx::Rect& clip_bounds_in_texture) { |
| DCHECK(compositor_->program_swizzle()); |
| - DrawInternal(*compositor_->program_swizzle(), params, clip_bounds); |
| + DrawInternal(*compositor_->program_swizzle(), params, clip_bounds_in_texture); |
| } |
| void TextureGL::DrawInternal(const ui::TextureProgramGL& program, |
| const ui::TextureDrawParams& params, |
| - const gfx::Rect& clip_bounds) { |
| + const gfx::Rect& clip_bounds_in_texture) { |
| + // clip clip_bounds_in_layer to size of texture |
|
sky
2011/08/17 15:53:57
-> Clip clip_bounds_in_texture to current size.
|
| + gfx::Rect clip_bounds = clip_bounds_in_texture.Intersect( |
| + gfx::Rect(gfx::Point(0, 0), size_)); |
| + |
| if (params.blend) |
| glEnable(GL_BLEND); |
| else |