gfx/skia/trunk/src/ports/SkGlobalInitialization_default.cpp

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.

michael@0 1 /*
michael@0 2 * Copyright 2011 Google Inc.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7
michael@0 8 #include "SkTypes.h"
michael@0 9
michael@0 10 #include "SkBitmapProcShader.h"
michael@0 11 #include "SkMallocPixelRef.h"
michael@0 12 #include "SkPathEffect.h"
michael@0 13 #include "SkPixelRef.h"
michael@0 14 #include "SkXfermode.h"
michael@0 15
michael@0 16 #include "Sk1DPathEffect.h"
michael@0 17 #include "Sk2DPathEffect.h"
michael@0 18 #include "SkArithmeticMode.h"
michael@0 19 #include "SkAvoidXfermode.h"
michael@0 20 #include "SkBicubicImageFilter.h"
michael@0 21 #include "SkBitmapSource.h"
michael@0 22 #include "SkBlurDrawLooper.h"
michael@0 23 #include "SkBlurImageFilter.h"
michael@0 24 #include "SkBlurMaskFilter.h"
michael@0 25 #include "SkColorFilter.h"
michael@0 26 #include "SkColorFilterImageFilter.h"
michael@0 27 #include "SkColorMatrixFilter.h"
michael@0 28 #include "SkColorShader.h"
michael@0 29 #include "SkComposeImageFilter.h"
michael@0 30 #include "SkComposeShader.h"
michael@0 31 #include "SkCornerPathEffect.h"
michael@0 32 #include "SkDashPathEffect.h"
michael@0 33 #include "SkDiscretePathEffect.h"
michael@0 34 #include "SkDisplacementMapEffect.h"
michael@0 35 #include "SkDropShadowImageFilter.h"
michael@0 36 #include "SkEmptyShader.h"
michael@0 37 #include "SkEmbossMaskFilter.h"
michael@0 38 #include "SkFlattenable.h"
michael@0 39 #include "SkGradientShader.h"
michael@0 40 #include "SkImages.h"
michael@0 41 #include "SkLayerDrawLooper.h"
michael@0 42 #include "SkLayerRasterizer.h"
michael@0 43 #include "SkLerpXfermode.h"
michael@0 44 #include "SkLightingImageFilter.h"
michael@0 45 #include "SkLumaColorFilter.h"
michael@0 46 #include "SkMagnifierImageFilter.h"
michael@0 47 #include "SkMatrixConvolutionImageFilter.h"
michael@0 48 #include "SkMergeImageFilter.h"
michael@0 49 #include "SkMorphologyImageFilter.h"
michael@0 50 #include "SkOffsetImageFilter.h"
michael@0 51 #include "SkOnce.h"
michael@0 52 #include "SkPerlinNoiseShader.h"
michael@0 53 #include "SkPictureImageFilter.h"
michael@0 54 #include "SkPixelXorXfermode.h"
michael@0 55 #include "SkRectShaderImageFilter.h"
michael@0 56 #include "SkResizeImageFilter.h"
michael@0 57 #include "SkStippleMaskFilter.h"
michael@0 58 #include "SkTableColorFilter.h"
michael@0 59 #include "SkTestImageFilters.h"
michael@0 60 #include "SkTileImageFilter.h"
michael@0 61 #include "SkXfermodeImageFilter.h"
michael@0 62
michael@0 63 static void InitializeFlattenables(int*) {
michael@0 64 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode)
michael@0 65 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBicubicImageFilter)
michael@0 66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader)
michael@0 67 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource)
michael@0 68 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper)
michael@0 69 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter)
michael@0 70 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter)
michael@0 71 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader)
michael@0 72 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect)
michael@0 73 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader)
michael@0 74 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkCornerPathEffect)
michael@0 75 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashPathEffect)
michael@0 76 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDilateImageFilter)
michael@0 77 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiscretePathEffect)
michael@0 78 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDisplacementMapEffect)
michael@0 79 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDropShadowImageFilter)
michael@0 80 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmbossMaskFilter)
michael@0 81 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmptyShader)
michael@0 82 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkErodeImageFilter)
michael@0 83 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerDrawLooper)
michael@0 84 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerRasterizer)
michael@0 85 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLerpXfermode)
michael@0 86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter)
michael@0 87 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect)
michael@0 88 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Sk2DPathEffect)
michael@0 89 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect)
michael@0 90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect)
michael@0 91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader)
michael@0 92 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureImageFilter)
michael@0 93 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode)
michael@0 94 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRectShaderImageFilter)
michael@0 95 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkResizeImageFilter)
michael@0 96 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStippleMaskFilter)
michael@0 97 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect)
michael@0 98 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTileImageFilter)
michael@0 99 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter)
michael@0 100 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter)
michael@0 101 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter)
michael@0 102
michael@0 103 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter)
michael@0 104 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter)
michael@0 105 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter)
michael@0 106 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter)
michael@0 107 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter)
michael@0 108 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMallocPixelRef)
michael@0 109
michael@0 110 SkArithmeticMode::InitializeFlattenables();
michael@0 111 SkBlurMaskFilter::InitializeFlattenables();
michael@0 112 SkColorFilter::InitializeFlattenables();
michael@0 113 SkGradientShader::InitializeFlattenables();
michael@0 114 SkImages::InitializeFlattenables();
michael@0 115 SkLightingImageFilter::InitializeFlattenables();
michael@0 116 SkTableColorFilter::InitializeFlattenables();
michael@0 117 SkXfermode::InitializeFlattenables();
michael@0 118 }
michael@0 119
michael@0 120 void SkFlattenable::InitializeFlattenablesIfNeeded() {
michael@0 121 int dummy;
michael@0 122 SK_DECLARE_STATIC_ONCE(once);
michael@0 123 SkOnce(&once, InitializeFlattenables, &dummy);
michael@0 124 }

mercurial