RESOLVED FIXED Bug 79875
[BlackBerry] Upstream classes that handle layer tiling
https://bugs.webkit.org/show_bug.cgi?id=79875
Summary [BlackBerry] Upstream classes that handle layer tiling
Robin Cao
Reported 2012-02-28 22:45:38 PST
Classes that handle layer tiling: LayerTile.cpp LayerTileData.h LayerTile.h LayerTileIndex.h LayerTiler.cpp LayerTiler.h
Attachments
patch (51.42 KB, patch)
2012-03-01 03:24 PST, Robin Cao
no flags
patch v2 (51.45 KB, patch)
2012-03-05 03:26 PST, Robin Cao
no flags
patch-v3 (49.92 KB, patch)
2012-03-08 04:45 PST, Robin Cao
no flags
patch-v4 (49.93 KB, patch)
2012-03-09 00:45 PST, Robin Cao
no flags
Robin Cao
Comment 1 2012-03-01 03:24:36 PST
WebKit Review Bot
Comment 2 2012-03-01 03:27:10 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
WebKit Review Bot
Comment 3 2012-03-01 03:28:06 PST
Attachment 129676 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'ChangeLog', u'LayoutTests/ChangeLog', u'La..." exit_code: 1 Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:160: This { should be at the end of the previous line [whitespace/braces] [4] Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:177: This { should be at the end of the previous line [whitespace/braces] [4] WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h" Total errors found: 2 in 142 files If any of these errors are false positives, please file a bug against check-webkit-style.
Robin Cao
Comment 4 2012-03-01 03:43:47 PST
The style error is false positives, a bug has been filed against check-webkit-style: https://bugs.webkit.org/show_bug.cgi?id=80018
Robin Cao
Comment 5 2012-03-01 18:09:47 PST
LayerTiler.cpp misses an include which is needed in debug build. #include "LayerMessage.h" Will add it before landing.
Adam Treat
Comment 6 2012-03-02 08:52:47 PST
Note, this originally had a piece that contained a hunk against LayerTiler.cpp. I've split it up so that is now committed to master_33. That should be included when you redo this Robin. https://bugs.webkit.org/show_bug.cgi?id=80161
Adam Treat
Comment 7 2012-03-02 13:08:16 PST
(In reply to comment #6) > Note, this originally had a piece that contained a hunk against LayerTiler.cpp. I've split it up so that is now committed to master_33. That should be included when you redo this Robin. https://bugs.webkit.org/show_bug.cgi?id=80161 See webkit/098ee04bed1a7e97ddf7bbeb7389b53a3f98e0ec for a patch that touches LayerTiler.cpp
Robin Cao
Comment 8 2012-03-05 03:26:29 PST
Created attachment 130087 [details] patch v2
WebKit Review Bot
Comment 9 2012-03-05 03:29:07 PST
Attachment 130087 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:161: This { should be at the end of the previous line [whitespace/braces] [4] Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:178: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Robin Cao
Comment 10 2012-03-05 03:34:26 PST
The style error is false positive, see https://bugs.webkit.org/show_bug.cgi?id=79875#c4
Rob Buis
Comment 11 2012-03-05 13:12:36 PST
Comment on attachment 130087 [details] patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=130087&action=review Looks good, can be cleaned up some more. > Source/WebCore/platform/graphics/blackberry/LayerTile.h:25 > +#include "IntRect.h" Can be just forward references. > Source/WebCore/platform/graphics/blackberry/LayerTileData.h:26 > +class LayerTileData { Not sure if this tiny class deserves its own file. Could we put it in LayerTile.h? > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:153 > + requiredTextureSize = IntSize(m_layer->contents()->width(), m_layer->contents()->height()); m_layer->contents()->size() should give IntSize too. > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:430 > + } I'd prefer: if (result.second) // Successfully added the new job. return; > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:527 > + FloatRect rect(-d, -d, 2*d, 2*d); Watch spacing 2*d > Source/WebCore/platform/graphics/blackberry/LayerTiler.h:41 > +class TransformationMatrix; Not used? Please check all.
Robin Cao
Comment 12 2012-03-08 04:26:37 PST
(In reply to comment #11) > (From update of attachment 130087 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=130087&action=review > > Looks good, can be cleaned up some more. > > > Source/WebCore/platform/graphics/blackberry/LayerTile.h:25 > > +#include "IntRect.h" > > Can be just forward references. > Fixed. > > Source/WebCore/platform/graphics/blackberry/LayerTileData.h:26 > > +class LayerTileData { > > Not sure if this tiny class deserves its own file. Could we put it in LayerTile.h? > Fixed > > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:153 > > + requiredTextureSize = IntSize(m_layer->contents()->width(), m_layer->contents()->height()); > > m_layer->contents()->size() should give IntSize too. > Good catch, fixed. > > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:430 > > + } > > I'd prefer: > if (result.second) // Successfully added the new job. > return; > > > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:527 > > + FloatRect rect(-d, -d, 2*d, 2*d); > > Watch spacing 2*d > Fixed. > > Source/WebCore/platform/graphics/blackberry/LayerTiler.h:41 > > +class TransformationMatrix; > > Not used? Please check all. All unnecessary includes and forward declarations are removed.
Robin Cao
Comment 13 2012-03-08 04:45:41 PST
Created attachment 130806 [details] patch-v3
WebKit Review Bot
Comment 14 2012-03-08 04:48:23 PST
Attachment 130806 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:160: This { should be at the end of the previous line [whitespace/braces] [4] Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:177: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Rob Buis
Comment 15 2012-03-08 08:02:13 PST
Comment on attachment 130806 [details] patch-v3 View in context: https://bugs.webkit.org/attachment.cgi?id=130806&action=review Looks good, but needs one more round :) > Source/WebCore/platform/graphics/blackberry/LayerTileIndex.h:68 > +template<> struct IntHash<WebCore::TileIndex> { You probably don't need WebCore:: prefixes in this file. > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:153 > + dirtyRect = IntRect(IntPoint(), requiredTextureSize); IntPoint::zero > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:159 > + if (requiredTextureSize.isEmpty() || dirtyRect == IntRect(IntPoint(), requiredTextureSize)) { IntPoint::zero > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:648 > +IntSize LayerTiler::defaultTileSize() It seems this is only used internally? If so you can make it a free, static function. > Source/WebCore/platform/graphics/blackberry/LayerTiler.h:104 > + : type(type) This looks really confusing, can you add m_ to the member vars? This makes it clear which is which. > Source/WebCore/platform/graphics/blackberry/LayerTiler.h:122 > + static TextureJob setContents(const SkBitmap& contents, bool isOpaque) { return TextureJob(SetContents, contents, IntRect(IntPoint(), IntSize(contents.width(), contents.height())), isOpaque); } IntPoint::zero
Robin Cao
Comment 16 2012-03-09 00:29:12 PST
(In reply to comment #15) > (From update of attachment 130806 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=130806&action=review > > Looks good, but needs one more round :) > > > Source/WebCore/platform/graphics/blackberry/LayerTileIndex.h:68 > > +template<> struct IntHash<WebCore::TileIndex> { > > You probably don't need WebCore:: prefixes in this file. > I removed 4 WebCore:: prefixes, the other WebCore:: prefixes in the WTF namespace can not be omitted. > > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:153 > > + dirtyRect = IntRect(IntPoint(), requiredTextureSize); > > IntPoint::zero > > > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:159 > > + if (requiredTextureSize.isEmpty() || dirtyRect == IntRect(IntPoint(), requiredTextureSize)) { > > IntPoint::zero > Fixed. > > Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:648 > > +IntSize LayerTiler::defaultTileSize() > > It seems this is only used internally? If so you can make it a free, static function. > Good point, fixed. > > Source/WebCore/platform/graphics/blackberry/LayerTiler.h:104 > > + : type(type) > > This looks really confusing, can you add m_ to the member vars? This makes it clear which is which. > My bad, I should have found this in the first round. All member variables have been prefixed now. > > Source/WebCore/platform/graphics/blackberry/LayerTiler.h:122 > > + static TextureJob setContents(const SkBitmap& contents, bool isOpaque) { return TextureJob(SetContents, contents, IntRect(IntPoint(), IntSize(contents.width(), contents.height())), isOpaque); } > > IntPoint::zero Done.
Robin Cao
Comment 17 2012-03-09 00:45:57 PST
Created attachment 131001 [details] patch-v4
WebKit Review Bot
Comment 18 2012-03-09 00:48:41 PST
Attachment 131001 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:167: This { should be at the end of the previous line [whitespace/braces] [4] Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp:184: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Rob Buis
Comment 19 2012-03-09 08:16:32 PST
Comment on attachment 131001 [details] patch-v4 LGTM.
WebKit Review Bot
Comment 20 2012-03-09 09:31:00 PST
Comment on attachment 131001 [details] patch-v4 Clearing flags on attachment: 131001 Committed r110300: <http://trac.webkit.org/changeset/110300>
WebKit Review Bot
Comment 21 2012-03-09 09:31:06 PST
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.