Changeset 133516 in webkit


Ignore:
Timestamp:
Nov 5, 2012, 12:49:05 PM (13 years ago)
Author:
jamesr@google.com
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):

Location:
trunk/Source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/Platform/ChangeLog

    r133499 r133516  
     12012-11-05  James Robinson  <jamesr@chromium.org>
     2
     3        [chromium] Use const SkBitmap& parameter for WebLayerTreeView::setFontAtlas
     4        https://bugs.webkit.org/show_bug.cgi?id=101016
     5
     6        Reviewed by Adrienne Walker.
     7
     8        Passing SkBitmap by value requires including SkBitmap.h, which is tricky for some clients to do since it
     9        requires having the rest of skia's headers on the include path and setting up the correct config to set
     10        preprocessor defines.  Also shuffles the parameter order around to make rolling easier since you can't override
     11        just by const ref-ness.
     12
     13        * chromium/public/WebLayerTreeView.h:
     14        (WebKit::WebLayerTreeView::setFontAtlas):
     15
    1162012-11-05  Alok Priyadarshi  <alokp@chromium.org>
    217
  • trunk/Source/Platform/chromium/public/WebLayerTreeView.h

    r133185 r133516  
    2727#define WebLayerTreeView_h
    2828
    29 #include "SkBitmap.h"
    3029#include "WebColor.h"
    3130#include "WebCommon.h"
     
    3433#include "WebPrivateOwnPtr.h"
    3534#include "WebSize.h"
     35
     36class SkBitmap;
    3637
    3738namespace WebKit {
     
    171172    // Provides a font atlas to use for debug visualizations. The atlas must be a bitmap containing glyph data, a table of
    172173    // ASCII character values to a subrectangle of the atlas representing the corresponding glyph, and the glyph height.
    173     virtual void setFontAtlas(SkBitmap, WebRect asciiToRectTable[128], int fontHeight) = 0;
     174    virtual void setFontAtlas(WebRect asciiToRectTable[128], const SkBitmap&, int fontHeight) { }
    174175
    175176    // Simulates a lost context. For testing only.
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r133503 r133516  
    40044004                int fontHeight;
    40054005                SkBitmap bitmap = WebCore::CompositorHUDFontAtlas::generateFontAtlas(asciiToRectTable, fontHeight);
    4006                 m_layerTreeView->setFontAtlas(bitmap, asciiToRectTable, fontHeight);
     4006                m_layerTreeView->setFontAtlas(asciiToRectTable, bitmap, fontHeight);
    40074007            }
    40084008        } else {
Note: See TracChangeset for help on using the changeset viewer.