Chromium Code Reviews| Index: cc/output/gl_renderer.cc |
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
| index 7cfb12405929277eed4317f64338b450355fa9fd..6f357b18e5e3344ee7f787aad371d09223f8f7f1 100644 |
| --- a/cc/output/gl_renderer.cc |
| +++ b/cc/output/gl_renderer.cc |
| @@ -157,11 +157,6 @@ bool GLRenderer::Initialize() { |
| Settings().partial_swap_enabled && |
| extensions.count("GL_CHROMIUM_post_sub_buffer"); |
| - // Use the SwapBuffers callback only with the threaded proxy. |
| - if (client_->HasImplThread()) |
| - capabilities_.using_swap_complete_callback = |
| - extensions.count("GL_CHROMIUM_swapbuffers_complete_callback") > 0; |
| - |
| capabilities_.using_set_visibility = |
| extensions.count("GL_CHROMIUM_set_visibility") > 0; |
| @@ -1859,12 +1854,6 @@ void GLRenderer::FinishDrawingFrame(DrawingFrame* frame) { |
| GLC(context_, context_->disable(GL_BLEND)); |
| blend_shadow_ = false; |
| - |
| - if (Settings().compositor_frame_message) { |
| - CompositorFrame compositor_frame; |
| - compositor_frame.metadata = client_->MakeCompositorFrameMetadata(); |
| - output_surface_->SendFrameToParentCompositor(&compositor_frame); |
| - } |
| } |
| void GLRenderer::FinishDrawingQuadList() { FlushTextureQuadCache(); } |
| @@ -1984,13 +1973,17 @@ void GLRenderer::Finish() { |
| context_->finish(); |
| } |
| -void GLRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) { |
| +void GLRenderer::SwapBuffers() { |
| DCHECK(visible_); |
| DCHECK(!is_backbuffer_discarded_); |
| TRACE_EVENT0("cc", "GLRenderer::SwapBuffers"); |
| // We're done! Time to swapbuffers! |
| + CompositorFrame compositor_frame; |
| + compositor_frame.metadata = client_->MakeCompositorFrameMetadata(); |
| + compositor_frame.gl_frame_data = make_scoped_ptr(new GLFrameData); |
| + compositor_frame.gl_frame_data->size = output_surface_->SurfaceSize(); |
| if (capabilities_.using_partial_swap && client_->AllowPartialSwap()) { |
| // If supported, we can save significant bandwidth by only swapping the |
| // damaged/scissored region (clamped to the viewport) |
| @@ -1998,14 +1991,13 @@ void GLRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) { |
| int flipped_y_pos_of_rect_bottom = |
| client_->DeviceViewport().height() - swap_buffer_rect_.y() - |
| swap_buffer_rect_.height(); |
| - output_surface_->PostSubBuffer(gfx::Rect(swap_buffer_rect_.x(), |
| - flipped_y_pos_of_rect_bottom, |
| - swap_buffer_rect_.width(), |
| - swap_buffer_rect_.height()), |
| - latency_info); |
| - } else { |
| - output_surface_->SwapBuffers(latency_info); |
| + compositor_frame.gl_frame_data->sub_buffer_rect = |
| + gfx::Rect(swap_buffer_rect_.x(), |
| + flipped_y_pos_of_rect_bottom, |
| + swap_buffer_rect_.width(), |
| + swap_buffer_rect_.height()); |
|
piman
2013/06/10 19:52:25
Is it at all possible that the rect here would be
aelias_OOO_until_Jul13
2013/06/10 23:18:07
OK, switched to full rect. And I introduced anoth
|
| } |
| + output_surface_->SwapBuffers(&compositor_frame); |
| swap_buffer_rect_ = gfx::Rect(); |