Bug 115360 - [BlackBerry] Replace disappearing fillBuffer() API with graphics context drawing
Summary: [BlackBerry] Replace disappearing fillBuffer() API with graphics context drawing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jakob Petsovits
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 08:41 PDT by Jakob Petsovits
Modified: 2013-04-29 17:11 PDT (History)
6 users (show)

See Also:


Attachments
Patch (21.80 KB, patch)
2013-04-29 08:54 PDT, Jakob Petsovits
no flags Details | Formatted Diff | Diff
Patch (22.35 KB, patch)
2013-04-29 11:01 PDT, Jakob Petsovits
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2013-04-29 08:41:12 PDT
Instead of using fillBuffer() to draw directly to the target buffer, we now lock a Drawable on it and fill it with PlatformGraphicsContext::addPredefinedPattern().

As a bonus, this also includes related clean-ups - simpler checkerboard painting code, removal of fillWindow(), clearWindow() and paintDefaultBackground(), as well as getting rid of the DEBUG_CHECKERBOARD define which has been useless for performance tracing purposes for a while now.

Internally tracked as PR 303048. Patch below.
Comment 1 Jakob Petsovits 2013-04-29 08:54:47 PDT
Created attachment 200019 [details]
Patch
Comment 2 Mike Lattanzio 2013-04-29 08:57:33 PDT
Comment on attachment 200019 [details]
Patch

Looks great.
Comment 3 Konrad Piascik 2013-04-29 09:14:32 PDT
Comment on attachment 200019 [details]
Patch

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

just those few nits...otherwise looks good

> Source/WebKit/blackberry/Api/BackingStore.cpp:1270
>                  std::vector<Platform::IntRect> dirtyRenderedRects = renderedRegion.rects();

std vs WTF vector

> Source/WebKit/blackberry/Api/BackingStore.cpp:1304
> +            std::vector<Platform::IntRect> overScrollRects = overScrollRegion.rects();

std vs WTF vector?

> Source/WebKit/blackberry/Api/BackingStore.cpp:1338
> +            overlayContext->setStrokeColor(0xff0000ff);

do you want to maybe save the state of the context before modifying it?
Comment 4 Jakob Petsovits 2013-04-29 11:01:07 PDT
Created attachment 200028 [details]
Patch
Comment 5 Jakob Petsovits 2013-04-29 11:04:07 PDT
(In reply to comment #3)
> (From update of attachment 200019 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=200019&action=review
> 
> just those few nits...otherwise looks good
> 
> > Source/WebKit/blackberry/Api/BackingStore.cpp:1270
> >                  std::vector<Platform::IntRect> dirtyRenderedRects = renderedRegion.rects();
> 
> std vs WTF vector

This one actually gets its list of rects from Platform::IntRectRegion, which returns them as std::vector. Given that we drop those again right afterwards, I don't believe it makes sense to convert this to WTF::Vector.

However, in an attempt to appease you, I made an improvement by taking the rects inside the for-loop as const reference and therefore avoiding a copy (unless the compiler took care of that by itself even otherwise).

> > Source/WebKit/blackberry/Api/BackingStore.cpp:1338
> > +            overlayContext->setStrokeColor(0xff0000ff);
> 
> do you want to maybe save the state of the context before modifying it?

Yes, I think I want that. Added in the new version.
Comment 6 Konrad Piascik 2013-04-29 12:28:37 PDT
Comment on attachment 200028 [details]
Patch

Ok.  Looks good, I'd r+ but not a reviewer yet :)
Comment 7 Rob Buis 2013-04-29 16:25:47 PDT
Comment on attachment 200028 [details]
Patch

Ok, good to see so much code removal.
Comment 8 WebKit Commit Bot 2013-04-29 17:11:37 PDT
Comment on attachment 200028 [details]
Patch

Clearing flags on attachment: 200028

Committed r149336: <http://trac.webkit.org/changeset/149336>
Comment 9 WebKit Commit Bot 2013-04-29 17:11:39 PDT
All reviewed patches have been landed.  Closing bug.