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

Side by Side Diff: include/core/SkGraphics.h

Issue 1329853005: Make SkGraphics::Term a no-op, stop calling it. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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 | « experimental/SkV8Example/SkV8Example.cpp ('k') | include/core/SkPaint.h » ('j') | 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkGraphics_DEFINED 8 #ifndef SkGraphics_DEFINED
9 #define SkGraphics_DEFINED 9 #define SkGraphics_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 class SkData; 13 class SkData;
14 class SkImageGenerator; 14 class SkImageGenerator;
15 class SkTraceMemoryDump; 15 class SkTraceMemoryDump;
16 16
17 class SK_API SkGraphics { 17 class SK_API SkGraphics {
18 public: 18 public:
19 /** 19 /**
20 * Call this at process initialization time if your environment does not 20 * Call this at process initialization time if your environment does not
21 * permit static global initializers that execute code. 21 * permit static global initializers that execute code.
22 * Init() is thread-safe and idempotent. 22 * Init() is thread-safe and idempotent.
23 */ 23 */
24 static void Init(); 24 static void Init();
25 25
26 /** 26 SK_ATTR_DEPRECATED("SkGraphics::Term() is a no-op. We're in the middle of c leaning it up.")
27 * Call this to release any memory held privately, such as the font cache. 27 static void Term() {}
28 */
29 static void Term();
30 28
31 /** 29 /**
32 * Return the version numbers for the library. If the parameter is not 30 * Return the version numbers for the library. If the parameter is not
33 * null, it is set to the version number. 31 * null, it is set to the version number.
34 */ 32 */
35 static void GetVersion(int32_t* major, int32_t* minor, int32_t* patch); 33 static void GetVersion(int32_t* major, int32_t* minor, int32_t* patch);
36 34
37 /** 35 /**
38 * Return the max number of bytes that should be used by the font cache. 36 * Return the max number of bytes that should be used by the font cache.
39 * If the cache needs to allocate more, it will purge previous entries. 37 * If the cache needs to allocate more, it will purge previous entries.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 * To instantiate images from encoded data, first looks at this runtime fun ction-ptr. If it 155 * To instantiate images from encoded data, first looks at this runtime fun ction-ptr. If it
158 * exists, it is called to create an SkImageGenerator from SkData. If there is no function-ptr 156 * exists, it is called to create an SkImageGenerator from SkData. If there is no function-ptr
159 * or there is, but it returns NULL, then skia will call its internal defau lt implementation. 157 * or there is, but it returns NULL, then skia will call its internal defau lt implementation.
160 * 158 *
161 * Returns the previous factory (which could be NULL). 159 * Returns the previous factory (which could be NULL).
162 */ 160 */
163 static ImageGeneratorFromEncodedFactory 161 static ImageGeneratorFromEncodedFactory
164 SetImageGeneratorFromEncodedFactory(ImageGeneratorFromEncodedFactory) ; 162 SetImageGeneratorFromEncodedFactory(ImageGeneratorFromEncodedFactory) ;
165 }; 163 };
166 164
167 class SkAutoGraphics { 165 class SkAutoGraphics {
scroggo 2015/09/08 17:57:28 It seems like this should go on the chopping block
mtklein 2015/09/08 22:17:20 Yes and no. As an alias for SkGraphics::Init(), S
scroggo 2015/09/09 14:22:48 Oh, I agree that we cannot necessarily remove SkGr
168 public: 166 public:
169 SkAutoGraphics() { 167 SkAutoGraphics() {
170 SkGraphics::Init(); 168 SkGraphics::Init();
171 } 169 }
172 ~SkAutoGraphics() {
173 SkGraphics::Term();
174 }
175 }; 170 };
176 171
177 #endif 172 #endif
OLDNEW
« no previous file with comments | « experimental/SkV8Example/SkV8Example.cpp ('k') | include/core/SkPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698