Title: [133516] trunk/Source
Revision
133516
Author
[email protected]
Date
2012-11-05 12:49:05 -0800 (Mon, 05 Nov 2012)

Log Message

[chromium] Use const SkBitmap& parameter for WebLayerTreeView::setFontAtlas
https://bugs.webkit.org/show_bug.cgi?id=101016

Reviewed by Adrienne Walker.

Passing SkBitmap by value requires including SkBitmap.h, which is tricky for some clients to do since it
requires having the rest of skia's headers on the include path and setting up the correct config to set
preprocessor defines.  Also shuffles the parameter order around to make rolling easier since you can't override
just by const ref-ness.

* chromium/public/WebLayerTreeView.h:
(WebKit::WebLayerTreeView::setFontAtlas):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (133515 => 133516)


--- trunk/Source/Platform/ChangeLog	2012-11-05 20:40:13 UTC (rev 133515)
+++ trunk/Source/Platform/ChangeLog	2012-11-05 20:49:05 UTC (rev 133516)
@@ -1,3 +1,18 @@
+2012-11-05  James Robinson  <[email protected]>
+
+        [chromium] Use const SkBitmap& parameter for WebLayerTreeView::setFontAtlas
+        https://bugs.webkit.org/show_bug.cgi?id=101016
+
+        Reviewed by Adrienne Walker.
+
+        Passing SkBitmap by value requires including SkBitmap.h, which is tricky for some clients to do since it
+        requires having the rest of skia's headers on the include path and setting up the correct config to set
+        preprocessor defines.  Also shuffles the parameter order around to make rolling easier since you can't override
+        just by const ref-ness.
+
+        * chromium/public/WebLayerTreeView.h:
+        (WebKit::WebLayerTreeView::setFontAtlas):
+
 2012-11-05  Alok Priyadarshi  <[email protected]>
 
         [chromium] Pass canPaintLCDText to WebContentLayerClient::paintContents

Modified: trunk/Source/Platform/chromium/public/WebLayerTreeView.h (133515 => 133516)


--- trunk/Source/Platform/chromium/public/WebLayerTreeView.h	2012-11-05 20:40:13 UTC (rev 133515)
+++ trunk/Source/Platform/chromium/public/WebLayerTreeView.h	2012-11-05 20:49:05 UTC (rev 133516)
@@ -26,7 +26,6 @@
 #ifndef WebLayerTreeView_h
 #define WebLayerTreeView_h
 
-#include "SkBitmap.h"
 #include "WebColor.h"
 #include "WebCommon.h"
 #include "WebFloatPoint.h"
@@ -34,6 +33,8 @@
 #include "WebPrivateOwnPtr.h"
 #include "WebSize.h"
 
+class SkBitmap;
+
 namespace WebKit {
 class WebGraphicsContext3D;
 class WebLayer;
@@ -170,7 +171,7 @@
 
     // Provides a font atlas to use for debug visualizations. The atlas must be a bitmap containing glyph data, a table of
     // ASCII character values to a subrectangle of the atlas representing the corresponding glyph, and the glyph height.
-    virtual void setFontAtlas(SkBitmap, WebRect asciiToRectTable[128], int fontHeight) = 0;
+    virtual void setFontAtlas(WebRect asciiToRectTable[128], const SkBitmap&, int fontHeight) { }
 
     // Simulates a lost context. For testing only.
     virtual void loseCompositorContext(int numTimes) = 0;

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (133515 => 133516)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-11-05 20:40:13 UTC (rev 133515)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-11-05 20:49:05 UTC (rev 133516)
@@ -4003,7 +4003,7 @@
                 WebRect asciiToRectTable[128];
                 int fontHeight;
                 SkBitmap bitmap = WebCore::CompositorHUDFontAtlas::generateFontAtlas(asciiToRectTable, fontHeight);
-                m_layerTreeView->setFontAtlas(bitmap, asciiToRectTable, fontHeight);
+                m_layerTreeView->setFontAtlas(asciiToRectTable, bitmap, fontHeight);
             }
         } else {
             m_nonCompositedContentHost.clear();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to