Bug 134248 - Only flush layers when the exposed rect actually changes
Summary: Only flush layers when the exposed rect actually changes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-24 06:46 PDT by Antti Koivisto
Modified: 2014-06-24 12:16 PDT (History)
1 user (show)

See Also:


Attachments
patch (2.57 KB, patch)
2014-06-24 06:56 PDT, Antti Koivisto
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2014-06-24 06:46:07 PDT
Currently we flush unconditionally.
Comment 1 Antti Koivisto 2014-06-24 06:56:47 PDT
Created attachment 233698 [details]
patch
Comment 2 Simon Fraser (smfr) 2014-06-24 08:56:57 PDT
Comment on attachment 233698 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233698&action=review

> Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:206
> +    auto rect = enclosingIntRect(exposedContentRect);
> +    if (frameView->exposedContentRect() == rect)
> +        return;

This makes assumptions about how FrameView does rounding. Maybe setExposedContentRect() should instead return a bool?
Comment 3 Antti Koivisto 2014-06-24 12:10:48 PDT
http://trac.webkit.org/changeset/170377
Comment 4 Antti Koivisto 2014-06-24 12:16:12 PDT
> This makes assumptions about how FrameView does rounding. Maybe setExposedContentRect() should instead return a bool?

There is currently no rounding (these were just switched to FloatRect) and it is generally reasonable to expect getters and setters to pair. The setter should probably be renamed if it starts rounding.