Index: content/renderer/gpu/mailbox_output_surface.cc |
diff --git a/content/renderer/gpu/mailbox_output_surface.cc b/content/renderer/gpu/mailbox_output_surface.cc |
index c1166fc80e8343914beffec432a9e6a1651ee884..6e7f22ff2ee4b06f254dbb64cf0ed116f0ae4df5 100644 |
--- a/content/renderer/gpu/mailbox_output_surface.cc |
+++ b/content/renderer/gpu/mailbox_output_surface.cc |
@@ -45,7 +45,7 @@ void MailboxOutputSurface::EnsureBackbuffer() { |
// Find a texture of matching size to recycle. |
while (!returned_textures_.empty()) { |
TransferableFrame& texture = returned_textures_.front(); |
- if (texture.size == size_) { |
+ if (texture.size == surface_size_) { |
current_backing_ = texture; |
ConsumeTexture(texture); |
returned_textures_.pop(); |
@@ -59,7 +59,7 @@ void MailboxOutputSurface::EnsureBackbuffer() { |
if (!current_backing_.texture_id) { |
current_backing_.texture_id = context3d_->createTexture(); |
- current_backing_.size = size_; |
+ current_backing_.size = surface_size_; |
context3d_->genMailboxCHROMIUM(current_backing_.mailbox.name); |
context3d_->bindTexture(GL_TEXTURE_2D, current_backing_.texture_id); |
context3d_->texParameteri( |
@@ -71,7 +71,8 @@ void MailboxOutputSurface::EnsureBackbuffer() { |
context3d_->texParameteri( |
GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
context3d_->texImage2D( |
- GL_TEXTURE_2D, 0, GL_RGBA, size_.width(), size_.height(), 0, |
+ GL_TEXTURE_2D, 0, GL_RGBA, |
+ surface_size_.width(), surface_size_.height(), 0, |
GL_RGBA, GL_UNSIGNED_BYTE, NULL); |
} |
} |
@@ -100,10 +101,10 @@ void MailboxOutputSurface::DiscardBackbuffer() { |
} |
void MailboxOutputSurface::Reshape(gfx::Size size, float scale_factor) { |
- if (size == size_) |
+ if (size == surface_size_) |
return; |
- size_ = size; |
+ surface_size_ = size; |
piman
2013/06/05 00:52:08
Also set device_scale_factor_ so that it doesn't g
|
DiscardBackbuffer(); |
EnsureBackbuffer(); |
} |
@@ -124,8 +125,8 @@ void MailboxOutputSurface::SendFrameToParentCompositor( |
cc::CompositorFrame* frame) { |
frame->gl_frame_data.reset(new GLFrameData()); |
- DCHECK(!size_.IsEmpty()); |
- DCHECK(size_ == current_backing_.size); |
+ DCHECK(!surface_size_.IsEmpty()); |
+ DCHECK(surface_size_ == current_backing_.size); |
DCHECK(!current_backing_.mailbox.IsZero()); |
context3d_->framebufferTexture2D( |