Index: content/browser/compositor/offscreen_browser_compositor_output_surface.cc |
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc |
index aa2df8f0c4ac85a10161c921470f3c1d84aa053a..122a39500fd95ab9ccce0f3afa7609873483b76d 100644 |
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc |
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc |
@@ -57,8 +57,8 @@ void OffscreenBrowserCompositorOutputSurface::EnsureBackbuffer() { |
const int max_texture_size = |
context_provider_->ContextCapabilities().max_texture_size; |
- int texture_width = std::min(max_texture_size, surface_size_.width()); |
- int texture_height = std::min(max_texture_size, surface_size_.height()); |
+ int texture_width = std::min(max_texture_size, reshape_size_.width()); |
+ int texture_height = std::min(max_texture_size, reshape_size_.height()); |
gl->BindTexture(GL_TEXTURE_2D, reflector_texture_->texture_id()); |
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
@@ -107,11 +107,7 @@ void OffscreenBrowserCompositorOutputSurface::Reshape( |
float scale_factor, |
const gfx::ColorSpace& color_space, |
bool alpha) { |
- if (size == surface_size_) |
- return; |
- |
- surface_size_ = size; |
- device_scale_factor_ = scale_factor; |
+ reshape_size_ = size; |
DiscardBackbuffer(); |
EnsureBackbuffer(); |
} |
@@ -132,7 +128,7 @@ void OffscreenBrowserCompositorOutputSurface::BindFramebuffer() { |
void OffscreenBrowserCompositorOutputSurface::SwapBuffers( |
cc::OutputSurfaceFrame frame) { |
gfx::Size surface_size = frame.size; |
- DCHECK(surface_size == surface_size_); |
+ DCHECK(surface_size == reshape_size_); |
gfx::Rect swap_rect = frame.sub_buffer_rect; |
if (reflector_) { |