Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2211)

Unified Diff: cc/output/gl_renderer.cc

Issue 2392183003: cc: Remove SurfaceSize from OutputSurface. (Closed)
Patch Set: nosurfacesize: ozonethinger Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index b882c276b594f23dbbd097ac8f57f3cf7bcd3b29..f4f2b96502da1a92fc7136b33f3af23e3f40d45a 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -2890,17 +2890,15 @@ void GLRenderer::SwapBuffers(CompositorFrameMetadata metadata) {
TRACE_EVENT0("cc,benchmark", "GLRenderer::SwapBuffers");
// We're done! Time to swapbuffers!
- gfx::Size surface_size = output_surface_->SurfaceSize();
-
CompositorFrame compositor_frame;
compositor_frame.metadata = std::move(metadata);
compositor_frame.gl_frame_data = base::WrapUnique(new GLFrameData);
- compositor_frame.gl_frame_data->size = surface_size;
+ compositor_frame.gl_frame_data->size = surface_size_for_swap_buffers_;
if (use_partial_swap_) {
// If supported, we can save significant bandwidth by only swapping the
// damaged/scissored region (clamped to the viewport).
- swap_buffer_rect_.Intersect(gfx::Rect(surface_size));
- int flipped_y_pos_of_rect_bottom = surface_size.height() -
+ swap_buffer_rect_.Intersect(gfx::Rect(surface_size_for_swap_buffers_));
+ int flipped_y_pos_of_rect_bottom = surface_size_for_swap_buffers_.height() -
swap_buffer_rect_.y() -
swap_buffer_rect_.height();
compositor_frame.gl_frame_data->sub_buffer_rect =
@@ -2912,7 +2910,7 @@ void GLRenderer::SwapBuffers(CompositorFrameMetadata metadata) {
// Expand the swap rect to the full surface unless it's empty, and empty
// swap is allowed.
if (!swap_buffer_rect_.IsEmpty() || !allow_empty_swap_) {
- swap_buffer_rect_ = gfx::Rect(surface_size);
+ swap_buffer_rect_ = gfx::Rect(surface_size_for_swap_buffers_);
}
compositor_frame.gl_frame_data->sub_buffer_rect = swap_buffer_rect_;
}
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698