OLD | NEW |
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 #ifndef SkAutoCo_DEFINED | 8 #ifndef SkAutoCo_DEFINED |
9 #define SkAutoCo_DEFINED | 9 #define SkAutoCo_DEFINED |
10 | 10 |
11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
12 | 12 |
| 13 #ifdef SK_BUILD_FOR_WIN |
| 14 |
13 /** | 15 /** |
14 * An instance of this class initializes COM on creation | 16 * An instance of this class initializes COM on creation |
15 * and closes the COM library on destruction. | 17 * and closes the COM library on destruction. |
16 */ | 18 */ |
17 class SkAutoCoInitialize : SkNoncopyable { | 19 class SkAutoCoInitialize : SkNoncopyable { |
18 private: | 20 private: |
19 HRESULT fHR; | 21 HRESULT fHR; |
20 public: | 22 public: |
21 SkAutoCoInitialize(); | 23 SkAutoCoInitialize(); |
22 ~SkAutoCoInitialize(); | 24 ~SkAutoCoInitialize(); |
23 bool succeeded(); | 25 bool succeeded(); |
24 }; | 26 }; |
25 | 27 |
26 #endif | 28 #endif // SK_BUILD_FOR_WIN |
| 29 #endif // SkAutoCo_DEFINED |
OLD | NEW |