From f291de7eecd98906f061afac01c5a474d48a9ac5 Mon Sep 17 00:00:00 2001 From: jbauman Date: Thu, 4 Dec 2014 17:47:04 -0800 Subject: [PATCH] Run Pepper 2D flush ack code on ViewInitiatedPaint. The Pepper 2D flush ack was originally executed on ViewFlushedPaint (UpdateRect ack) both to throttle it and so that it was certain that the TransportDIB that was shared to the browser was not in use anymore. It makes sense to move the flush ack to ViewInitiatedPaint (compositor commit completed) because that's consistent with pepper 3d, handles throttling at least as well, and it's not sharing TransportDIBs with the browser anymore so that doesn't matter. BUG=438646 Review URL: https://codereview.chromium.org/784443002 Cr-Commit-Position: refs/heads/master@{#306953} --- content/renderer/pepper/pepper_graphics_2d_host.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/content/renderer/pepper/pepper_graphics_2d_host.cc b/content/renderer/pepper/pepper_graphics_2d_host.cc index 9084372309f3..da3e230a1ebf 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.cc +++ b/content/renderer/pepper/pepper_graphics_2d_host.cc @@ -384,16 +384,17 @@ void PepperGraphics2DHost::Paint(blink::WebCanvas* canvas, canvas->drawBitmap(image, pixel_origin.x(), pixel_origin.y(), &paint); } -void PepperGraphics2DHost::ViewInitiatedPaint() {} - -void PepperGraphics2DHost::ViewFlushedPaint() { - TRACE_EVENT0("pepper", "PepperGraphics2DHost::ViewFlushedPaint"); +void PepperGraphics2DHost::ViewInitiatedPaint() { + TRACE_EVENT0("pepper", "PepperGraphics2DHost::ViewInitiatedPaint"); if (need_flush_ack_) { SendFlushAck(); need_flush_ack_ = false; } } +void PepperGraphics2DHost::ViewFlushedPaint() { +} + void PepperGraphics2DHost::SetScale(float scale) { scale_ = scale; } float PepperGraphics2DHost::GetScale() const { return scale_; } -- 2.11.4.GIT