Title: [135929] trunk/Source
Revision
135929
Author
commit-qu...@webkit.org
Date
2012-11-27 15:17:02 -0800 (Tue, 27 Nov 2012)

Log Message

[chromium] Add WebLayerTreeViewClient API to request font atlas
https://bugs.webkit.org/show_bug.cgi?id=102958

Patch by Eberhard Graether <egraet...@google.com> on 2012-11-27
Reviewed by James Robinson.

This change makes the font atlas creation accessible to the WebLayerTreeView.

Source/Platform:

* chromium/public/WebLayerTreeViewClient.h:
(WebKit):
(WebLayerTreeViewClient):
(WebKit::WebLayerTreeViewClient::createFontAtlas):

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::createFontAtlas):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (135928 => 135929)


--- trunk/Source/Platform/ChangeLog	2012-11-27 23:13:05 UTC (rev 135928)
+++ trunk/Source/Platform/ChangeLog	2012-11-27 23:17:02 UTC (rev 135929)
@@ -1,5 +1,19 @@
 2012-11-27  Eberhard Graether  <egraet...@google.com>
 
+        [chromium] Add WebLayerTreeViewClient API to request font atlas
+        https://bugs.webkit.org/show_bug.cgi?id=102958
+
+        Reviewed by James Robinson.
+
+        This change makes the font atlas creation accessible to the WebLayerTreeView.
+
+        * chromium/public/WebLayerTreeViewClient.h:
+        (WebKit):
+        (WebLayerTreeViewClient):
+        (WebKit::WebLayerTreeViewClient::createFontAtlas):
+
+2012-11-27  Eberhard Graether  <egraet...@google.com>
+
         Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
         https://bugs.webkit.org/show_bug.cgi?id=102452
 

Modified: trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h (135928 => 135929)


--- trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h	2012-11-27 23:13:05 UTC (rev 135928)
+++ trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h	2012-11-27 23:17:02 UTC (rev 135929)
@@ -26,10 +26,13 @@
 #ifndef WebLayerTreeViewClient_h
 #define WebLayerTreeViewClient_h
 
+class SkBitmap;
+
 namespace WebKit {
 class WebCompositorOutputSurface;
 class WebInputHandler;
 class WebThread;
+struct WebRect;
 struct WebSize;
 
 class WebLayerTreeViewClient {
@@ -90,6 +93,11 @@
     // internally schedule a compositing pass when needed.
     virtual void scheduleComposite() = 0;
 
+    // Creates a font atlas to use for debug visualizations. The atlas is 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 createFontAtlas(SkBitmap&, WebRect asciiToRectTable[128], int& fontHeight) { }
+
 protected:
     virtual ~WebLayerTreeViewClient() { }
 };

Modified: trunk/Source/WebKit/chromium/ChangeLog (135928 => 135929)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-11-27 23:13:05 UTC (rev 135928)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-11-27 23:17:02 UTC (rev 135929)
@@ -1,3 +1,18 @@
+2012-11-27  Eberhard Graether  <egraet...@google.com>
+
+        [chromium] Add WebLayerTreeViewClient API to request font atlas
+        https://bugs.webkit.org/show_bug.cgi?id=102958
+
+        Reviewed by James Robinson.
+
+        This change makes the font atlas creation accessible to the WebLayerTreeView.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::createFontAtlas):
+        (WebKit):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+
 2012-11-27  Joshua Bell  <jsb...@chromium.org>
 
         IndexedDB: Simplify transaction timers and event tracking

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (135928 => 135929)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-11-27 23:13:05 UTC (rev 135928)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-11-27 23:17:02 UTC (rev 135929)
@@ -4212,6 +4212,12 @@
     m_client->scheduleComposite();
 }
 
+void WebViewImpl::createFontAtlas(SkBitmap& bitmap, WebRect asciiToRectTable[128], int& fontHeight)
+{
+    TRACE_EVENT0("webkit", "WebViewImpl::loadFontAtlas");
+    bitmap = WebCore::CompositorHUDFontAtlas::generateFontAtlas(asciiToRectTable, fontHeight);
+}
+
 void WebViewImpl::updateLayerTreeViewport()
 {
     if (!page() || !m_nonCompositedContentHost || !m_layerTreeView)

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (135928 => 135929)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-11-27 23:13:05 UTC (rev 135928)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-11-27 23:17:02 UTC (rev 135929)
@@ -325,6 +325,7 @@
     virtual void didCommitAndDrawFrame();
     virtual void didCompleteSwapBuffers();
     virtual void scheduleComposite();
+    virtual void createFontAtlas(SkBitmap&, WebRect[128], int&);
 
     // WebViewImpl
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to