#include "../platform/WebCommon.h"
#include "../platform/WebRect.h"
#include "../platform/WebSize.h"
+#include "WebBeginFrameArgs.h"
#include "WebCompositionUnderline.h"
#include "WebTextDirection.h"
#include "WebTextInputInfo.h"
namespace blink {
+class WebCompositeAndReadbackAsyncCallback;
class WebInputEvent;
class WebLayerTreeView;
class WebMouseEvent;
// Called to resize the WebWidget.
virtual void resize(const WebSize&) { }
+ // Resizes the unscaled pinch viewport. Normally the unscaled pinch
+ // viewport is the same size as the main frame. The passed size becomes the
+ // size of the viewport when unscaled (i.e. scale = 1). This is used to
+ // shrink the visible viewport to allow things like the ChromeOS virtual
+ // keyboard to overlay over content but allow scrolling it into view.
+ virtual void resizePinchViewport(const WebSize&) { }
+
// Ends a group of resize events that was started with a call to
// willStartLiveResize.
virtual void willEndLiveResize() { }
// Called to update imperative animation state. This should be called before
// paint, although the client can rate-limit these calls.
- virtual void animate(double monotonicFrameBeginTime) { }
+ // FIXME: Remove this function once Chrome side patch lands.
+ void animate(double monotonicFrameBeginTime)
+ {
+ beginFrame(WebBeginFrameArgs(monotonicFrameBeginTime));
+ }
+ virtual void beginFrame(const WebBeginFrameArgs& frameTime) { }
// Called to layout the WebWidget. This MUST be called before Paint,
// and it may result in calls to WebWidgetClient::didInvalidateRect.
virtual void layout() { }
- // Called to toggle the WebWidget in or out of force compositing mode. This
- // should be called before paint.
- virtual void enterForceCompositingMode(bool enter) { }
-
- // Called to notify the WebWidget that the widget has exited compositing
- // mode and cannot reenter.
- virtual void didExitCompositingMode() { }
-
- enum PaintOptions {
- // Attempt to fulfill the painting request by reading back from the
- // compositor, assuming we're using a compositor to render.
- ReadbackFromCompositorIfAvailable,
-
- // Force the widget to rerender onto the canvas using software. This
- // mode ignores 3d transforms and ignores GPU-resident content, such
- // as video, canvas, and WebGL.
- //
- // Note: This option exists on OS(ANDROID) and will hopefully be
- // removed once the link disambiguation feature renders using
- // the compositor.
- ForceSoftwareRenderingAndIgnoreGPUResidentContent,
- };
-
// Called to paint the rectangular region within the WebWidget
// onto the specified canvas at (viewPort.x,viewPort.y). You MUST call
// Layout before calling this method. It is okay to call paint
// changes are made to the WebWidget (e.g., once events are
// processed, it should be assumed that another call to layout is
// warranted before painting again).
- virtual void paint(WebCanvas*, const WebRect& viewPort, PaintOptions = ReadbackFromCompositorIfAvailable) { }
+ virtual void paint(WebCanvas*, const WebRect& viewPort) { }
+
+ virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) { }
+
+ // The caller is responsible for keeping the WebCompositeAndReadbackAsyncCallback
+ // object alive until it is called. This should only be called when
+ // isAcceleratedCompositingActive() is true.
+ virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) { }
// Returns true if we've started tracking repaint rectangles.
virtual bool isTrackingRepaints() const { return false; }