gfx/skia/trunk/include/ports/SkHarfBuzzFont.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /*
     2  * Copyright 2009 Google Inc.
     3  *
     4  * Use of this source code is governed by a BSD-style license that can be
     5  * found in the LICENSE file.
     6  */
     8 #ifndef SkHarfBuzzFont_DEFINED
     9 #define SkHarfBuzzFont_DEFINED
    11 extern "C" {
    12 #include "harfbuzz-shaper.h"
    13 //#include "harfbuzz-unicode.h"
    14 }
    16 #include "SkTypes.h"
    18 class SkPaint;
    19 class SkTypeface;
    21 class SkHarfBuzzFont {
    22 public:
    23     /** The subclass returns the typeface for this font, or NULL
    24      */
    25     virtual SkTypeface* getTypeface() const = 0;
    26     /** The subclass sets the text related attributes of the paint.
    27         e.g. textSize, typeface, textSkewX, etc.
    28         All of the attributes that could effect how the text is measured.
    29         Color information (e.g. color, xfermode, shader, etc.) are not required.
    30      */
    31     virtual void setupPaint(SkPaint*) const = 0;
    33     /** Implementation of HB_GetFontTableFunc, using SkHarfBuzzFont* as
    34         the first parameter.
    35      */
    36     static HB_Error GetFontTableFunc(void* skharfbuzzfont, const HB_Tag tag,
    37                                      HB_Byte* buffer, HB_UInt* len);
    39     static const HB_FontClass& GetFontClass();
    40 };
    42 #endif

mercurial