gfx/skia/trunk/src/fonts/SkGScalerContext.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 2013 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 SkGScalerContext_DEFINED
     9 #define SkGScalerContext_DEFINED
    11 #include "SkScalerContext.h"
    12 #include "SkTypeface.h"
    14 class SkGTypeface : public SkTypeface {
    15 public:
    16     SkGTypeface(SkTypeface* proxy, const SkPaint&);
    17     virtual ~SkGTypeface();
    19     SkTypeface* proxy() const { return fProxy; }
    20     const SkPaint& paint() const { return fPaint; }
    22 protected:
    23     virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE;
    24     virtual void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE;
    25     virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
    26                                     SkAdvancedTypefaceMetrics::PerGlyphInfo,
    27                                     const uint32_t* glyphIDs,
    28                                     uint32_t glyphIDsCount) const SK_OVERRIDE;
    29     virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
    30     virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const SK_OVERRIDE;
    32     virtual int onCharsToGlyphs(const void* chars, Encoding encoding,
    33                                 uint16_t glyphs[], int glyphCount) const SK_OVERRIDE;
    34     virtual int onCountGlyphs() const SK_OVERRIDE;
    35     virtual int onGetUPEM() const SK_OVERRIDE;
    37     virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE;
    39     virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE;
    40     virtual size_t onGetTableData(SkFontTableTag, size_t offset,
    41                                   size_t length, void* data) const SK_OVERRIDE;
    43 private:
    44     SkTypeface* fProxy;
    45     SkPaint     fPaint;
    46 };
    48 #endif

mercurial