| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 4 * | 3 * |
| 5 * 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 |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 | |
| 10 #ifndef SkAutoCo_DEFINED | 8 #ifndef SkAutoCo_DEFINED |
| 11 #define SkAutoCo_DEFINED | 9 #define SkAutoCo_DEFINED |
| 12 | 10 |
| 13 #define WIN32_LEAN_AND_MEAN | 11 #include "SkTypes.h" |
| 14 #include <windows.h> | |
| 15 #include "SkTemplates.h" | |
| 16 | 12 |
| 17 /** | 13 /** |
| 18 * An instance of this class initializes COM on creation | 14 * An instance of this class initializes COM on creation |
| 19 * and closes the COM library on destruction. | 15 * and closes the COM library on destruction. |
| 20 */ | 16 */ |
| 21 class SkAutoCoInitialize : SkNoncopyable { | 17 class SkAutoCoInitialize : SkNoncopyable { |
| 22 private: | 18 private: |
| 23 HRESULT fHR; | 19 HRESULT fHR; |
| 24 public: | 20 public: |
| 25 SkAutoCoInitialize(); | 21 SkAutoCoInitialize(); |
| 26 ~SkAutoCoInitialize(); | 22 ~SkAutoCoInitialize(); |
| 27 bool succeeded(); | 23 bool succeeded(); |
| 28 }; | 24 }; |
| 29 | 25 |
| 30 #endif | 26 #endif |
| OLD | NEW |