Bug 115360

Summary: [BlackBerry] Replace disappearing fillBuffer() API with graphics context drawing
Product: WebKit Reporter: Jakob Petsovits <jpetsovits>
Component: WebKit BlackBerryAssignee: Jakob Petsovits <jpetsovits>
Status: RESOLVED FIXED    
Severity: Normal CC: anilsson, commit-queue, kpiascik, mlattanzio, rwlbuis, staikos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Jakob Petsovits
Reported 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.
Attachments
Patch (21.80 KB, patch)
2013-04-29 08:54 PDT, Jakob Petsovits
no flags
Patch (22.35 KB, patch)
2013-04-29 11:01 PDT, Jakob Petsovits
no flags
Jakob Petsovits
Comment 1 2013-04-29 08:54:47 PDT
Mike Lattanzio
Comment 2 2013-04-29 08:57:33 PDT
Comment on attachment 200019 [details] Patch Looks great.
Konrad Piascik
Comment 3 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?
Jakob Petsovits
Comment 4 2013-04-29 11:01:07 PDT
Jakob Petsovits
Comment 5 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.
Konrad Piascik
Comment 6 2013-04-29 12:28:37 PDT
Comment on attachment 200028 [details] Patch Ok. Looks good, I'd r+ but not a reviewer yet :)
Rob Buis
Comment 7 2013-04-29 16:25:47 PDT
Comment on attachment 200028 [details] Patch Ok, good to see so much code removal.
WebKit Commit Bot
Comment 8 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>
WebKit Commit Bot
Comment 9 2013-04-29 17:11:39 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.