Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp |
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
| index c7bd60281f12277fc42607777511075a526ae111..34751cd5717cb692e1a1d5fbcfc5142e4a080a34 100644 |
| --- a/Source/web/WebViewImpl.cpp |
| +++ b/Source/web/WebViewImpl.cpp |
| @@ -1806,6 +1806,29 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOptions opt |
| } |
| } |
| +#if OS(ANDROID) |
| +void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& rect, PaintOptions option) |
|
enne (OOO)
2014/05/02 23:34:45
Does this even compile? Looks like your definition
danakj
2014/05/02 23:36:07
Oops, probly not, was going to let bots tell me :)
|
| +{ |
| + // Note: This method exists on OS(ANDROID) and will hopefully be |
| + // removed once the link disambiguation feature renders using |
| + // the compositor. |
| + ASSERT(isAcceleratedCompositingActive()); |
| + |
| + FrameView* view = page()->mainFrame()->view(); |
| + PaintBehavior oldPaintBehavior = view->paintBehavior(); |
| + view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLayers); |
| + |
| + double paintStart = currentTime(); |
|
enne (OOO)
2014/05/02 23:34:45
This duplicated timing code makes me a little sad,
danakj
2014/05/02 23:36:07
I was going to make this call paint() but I want p
|
| + PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTransparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque); |
| + double paintEnd = currentTime(); |
| + double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); |
| + blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); |
| + blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); |
| + |
| + view->setPaintBehavior(oldPaintBehavior); |
| +} |
| +#endif |
| + |
| bool WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback* callback) |
| { |
| if (!isAcceleratedCompositingActive()) |