Bug 61953 - cleanup DrawingBufferChromium, correct comment
Summary: cleanup DrawingBufferChromium, correct comment
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 13:05 PDT by John Bates
Modified: 2011-06-02 19:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.15 KB, patch)
2011-06-02 13:07 PDT, John Bates
no flags Details | Formatted Diff | Diff
Patch (5.33 KB, patch)
2011-06-02 14:11 PDT, John Bates
no flags Details | Formatted Diff | Diff
Patch (5.26 KB, patch)
2011-06-02 15:26 PDT, John Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Bates 2011-06-02 13:05:47 PDT
cleanup DrawingBufferChromium, correct comment
Comment 1 John Bates 2011-06-02 13:07:40 PDT
Created attachment 95794 [details]
Patch
Comment 2 John Bates 2011-06-02 13:15:32 PDT
Ready for review
Comment 3 Kenneth Russell 2011-06-02 13:28:05 PDT
Comment on attachment 95794 [details]
Patch

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

> Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:46
> +class Canvas2DLayerChromium { };

I doubt this will compile. RefPtr requires certain methods.
Comment 4 James Robinson 2011-06-02 13:31:31 PDT
Comment on attachment 95794 [details]
Patch

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

Patch looks great, but R- for the odd forward declaration and lack of verbosity in the ChangeLog.  Thanks a bunch for cleaning this up.

> Source/WebCore/ChangeLog:8
> +        https://bugs.webkit.org/show_bug.cgi?id=61953
> +
> +        * platform/graphics/chromium/DrawingBufferChromium.cpp:

please put a more verbose description here if what this patch does.

> Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:46
> +class Canvas2DLayerChromium { };

To forward declare Canvas2DLayerChromium just do:

class Canvas2DLayerChromium;

I don't think you need to do this, however - do you?  I think all the references to Canvas2DLayerChromium are guarded by #if USE(ACCELERATED_COMPOSITING), or at least they should be.
Comment 5 John Bates 2011-06-02 13:49:20 PDT
Comment on attachment 95794 [details]
Patch

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

>>> Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:46
>>> +class Canvas2DLayerChromium { };
>> 
>> I doubt this will compile. RefPtr requires certain methods.
> 
> To forward declare Canvas2DLayerChromium just do:
> 
> class Canvas2DLayerChromium;
> 
> I don't think you need to do this, however - do you?  I think all the references to Canvas2DLayerChromium are guarded by #if USE(ACCELERATED_COMPOSITING), or at least they should be.

It wasn't a forward declare, it was a dirty attempt to avoid referring to USE(ACCELERATED_COMPOSITING) in DrawingBuffer.h. But, Ken's right, it won't compile since it doesn't have the RefPtr methods. I'll just use #if USE(ACCELERATED_COMPOSITING) in DrawingBuffer.h.
Comment 6 John Bates 2011-06-02 14:11:55 PDT
Created attachment 95804 [details]
Patch
Comment 7 James Robinson 2011-06-02 14:15:35 PDT
Comment on attachment 95804 [details]
Patch

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

> Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:83
> +    , m_platformLayer(0)

You don't need to 0-initialize RefPtr<>s, and in fact this'll stop compiling when we get stricter about RefPtr/PassRefPtr usage.  Just leave the initialization out - the default c'tor for RefPtr does the right thing.
Comment 8 John Bates 2011-06-02 14:27:21 PDT
Comment on attachment 95794 [details]
Patch

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

>> Source/WebCore/ChangeLog:8
>> +        * platform/graphics/chromium/DrawingBufferChromium.cpp:
> 
> please put a more verbose description here if what this patch does.

Done.
Comment 9 John Bates 2011-06-02 15:26:55 PDT
Created attachment 95823 [details]
Patch
Comment 10 John Bates 2011-06-02 15:27:08 PDT
Comment on attachment 95804 [details]
Patch

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

>> Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:83
>> +    , m_platformLayer(0)
> 
> You don't need to 0-initialize RefPtr<>s, and in fact this'll stop compiling when we get stricter about RefPtr/PassRefPtr usage.  Just leave the initialization out - the default c'tor for RefPtr does the right thing.

Done.
Comment 11 James Robinson 2011-06-02 15:39:13 PDT
Comment on attachment 95823 [details]
Patch

Rock
Comment 12 WebKit Commit Bot 2011-06-02 19:11:00 PDT
Comment on attachment 95823 [details]
Patch

Clearing flags on attachment: 95823

Committed r87987: <http://trac.webkit.org/changeset/87987>
Comment 13 WebKit Commit Bot 2011-06-02 19:11:05 PDT
All reviewed patches have been landed.  Closing bug.