Bug 68213 - remove redundant and error-prone semantics with m_dirtyRect and m_contentsDirty in LayerChromium.
Summary: remove redundant and error-prone semantics with m_dirtyRect and m_contentsDir...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shawn Singh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 19:36 PDT by Shawn Singh
Modified: 2011-10-11 16:50 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.99 KB, patch)
2011-09-15 20:34 PDT, Shawn Singh
no flags Details | Formatted Diff | Diff
Patch (8.21 KB, patch)
2011-09-16 09:59 PDT, Shawn Singh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Singh 2011-09-15 19:36:48 PDT
m_contentsDirty is used by some layers,  m_dirtyRect.isEmpty() is used by other layers.

Thankfully, LayerChromium initializes both properly, but the individual layer types may be expected to reset these values themselves, and they only set one or the other, not both.


One solution is to remove m_contentsDirty.  All layers should check if the m_dirtyRect is empty.
Comment 1 Shawn Singh 2011-09-15 20:34:52 PDT
Created attachment 107595 [details]
Patch
Comment 2 James Robinson 2011-09-15 23:55:46 PDT
Comment on attachment 107595 [details]
Patch

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

> Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp:72
> +    if (!m_dirtyRect.isEmpty()) {

Since you're here, this if check is clearly unnecessary.  Can you remove it?
Comment 3 Shawn Singh 2011-09-16 09:59:46 PDT
Created attachment 107669 [details]
Patch
Comment 4 James Robinson 2011-09-16 11:03:39 PDT
Comment on attachment 107669 [details]
Patch

Cool
Comment 5 WebKit Review Bot 2011-09-16 21:38:50 PDT
Comment on attachment 107669 [details]
Patch

Clearing flags on attachment: 107669

Committed r95365: <http://trac.webkit.org/changeset/95365>
Comment 6 WebKit Review Bot 2011-09-16 21:38:55 PDT
All reviewed patches have been landed.  Closing bug.