Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: src/ports/SkGlobalInitialization_chromium.cpp

Issue 1193453004: Add a note to SkGlobalInitialization_chromium.cpp. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 9
10 #include "SkBitmapProcShader.h" 10 #include "SkBitmapProcShader.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "SkPictureImageFilter.h" 54 #include "SkPictureImageFilter.h"
55 #include "SkPictureShader.h" 55 #include "SkPictureShader.h"
56 #include "SkPixelXorXfermode.h" 56 #include "SkPixelXorXfermode.h"
57 #include "SkRectShaderImageFilter.h" 57 #include "SkRectShaderImageFilter.h"
58 #include "SkTableColorFilter.h" 58 #include "SkTableColorFilter.h"
59 #include "SkTestImageFilters.h" 59 #include "SkTestImageFilters.h"
60 #include "SkTileImageFilter.h" 60 #include "SkTileImageFilter.h"
61 #include "SkMatrixImageFilter.h" 61 #include "SkMatrixImageFilter.h"
62 #include "SkXfermodeImageFilter.h" 62 #include "SkXfermodeImageFilter.h"
63 63
64 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
65 //
66 // Adding new classes to Init() below has security consequences in Chrome.
67 //
68 // In particular, it is important that we don't create code paths that
69 // deserialize untrusted data as SkImageFilters; SkImageFilters are sent from
70 // Chrome renderers (untrusted) to the main (trusted) process.
71 //
72 // If you add a new SkImageFilter here _or_ other effect that can be part of
73 // an SkImageFilter, it's a good idea to have chrome-security@google.com sign
74 // off on the CL, and at minimum extend SampleFilterFuzz.cpp to fuzz it.
75 //
76 // SkPictures are untrusted data. Please be extremely careful not to allow
77 // SkPictures created in a Chrome renderer to be deserialized in the main proce ss.
78 //
79 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
80
64 class SkPrivateEffectInitializer { 81 class SkPrivateEffectInitializer {
65 public: 82 public:
66 static void Init() { 83 static void Init() {
67 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArcToPathEffect) 84 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArcToPathEffect)
68 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) 85 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader)
69 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) 86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource)
70 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper) 87 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper)
71 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter) 88 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter)
72 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorCubeFilter) 89 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorCubeFilter)
73 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter) 90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SkLightingImageFilter::InitializeFlattenables(); 134 SkLightingImageFilter::InitializeFlattenables();
118 SkTableColorFilter::InitializeFlattenables(); 135 SkTableColorFilter::InitializeFlattenables();
119 SkXfermode::InitializeFlattenables(); 136 SkXfermode::InitializeFlattenables();
120 } 137 }
121 }; 138 };
122 139
123 SK_DECLARE_STATIC_ONCE(once); 140 SK_DECLARE_STATIC_ONCE(once);
124 void SkFlattenable::InitializeFlattenablesIfNeeded() { 141 void SkFlattenable::InitializeFlattenablesIfNeeded() {
125 SkOnce(&once, SkPrivateEffectInitializer::Init); 142 SkOnce(&once, SkPrivateEffectInitializer::Init);
126 } 143 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698