diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h index 8259008416b6..2e22f5e784c2 100644 --- a/gfx/skia/trunk/include/config/SkUserConfig.h +++ b/gfx/skia/trunk/include/config/SkUserConfig.h @@ -188,7 +188,7 @@ */ //#define SK_ATOMICS_PLATFORM_H "SkAtomics_xxx.h" //#define SK_MUTEX_PLATFORM_H "SkMutex_xxx.h" -# if defined(SK_BUILD_FOR_WIN32) +# if defined(_MSC_VER) # define SK_ATOMICS_PLATFORM_H "skia/SkAtomics_win.h" # elif defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) # define SK_ATOMICS_PLATFORM_H "skia/SkAtomics_android.h" diff --git a/gfx/skia/trunk/include/core/SkPostConfig.h b/gfx/skia/trunk/include/core/SkPostConfig.h index dc76522ac15a..8f62a7098771 100644 --- a/gfx/skia/trunk/include/core/SkPostConfig.h +++ b/gfx/skia/trunk/include/core/SkPostConfig.h @@ -374,7 +374,7 @@ ////////////////////////////////////////////////////////////////////// #ifndef SK_ATOMICS_PLATFORM_H -# if defined(SK_BUILD_FOR_WIN) +# if defined(_MSC_VER) # define SK_ATOMICS_PLATFORM_H "../../src/ports/SkAtomics_win.h" # elif defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) # define SK_ATOMICS_PLATFORM_H "../../src/ports/SkAtomics_android.h" diff --git a/gfx/skia/trunk/src/ports/SkOSFile_win.cpp b/gfx/skia/trunk/src/ports/SkOSFile_win.cpp index 7fec557987e3..a0848915ba49 100644 --- a/gfx/skia/trunk/src/ports/SkOSFile_win.cpp +++ b/gfx/skia/trunk/src/ports/SkOSFile_win.cpp @@ -50,18 +50,16 @@ bool sk_fidentical(SkFILE* a, SkFILE* b) { && aID.fVolume == bID.fVolume; } -template -class SkAutoTHandle : SkNoncopyable { +class SkAutoNullKernelHandle : SkNoncopyable { public: - SkAutoTHandle(HandleType handle) : fHandle(handle) { } - ~SkAutoTHandle() { Close(fHandle); } - operator HandleType() { return fHandle; } - bool isValid() { return InvalidValue != fHandle; } + SkAutoNullKernelHandle(const HANDLE handle) : fHandle(handle) { } + ~SkAutoNullKernelHandle() { CloseHandle(fHandle); } + operator HANDLE() const { return fHandle; } + bool isValid() const { return NULL != fHandle; } private: - HandleType fHandle; + HANDLE fHandle; }; -typedef SkAutoTHandle SkAutoWinFile; -typedef SkAutoTHandle SkAutoWinMMap; +typedef SkAutoNullKernelHandle SkAutoWinMMap; void sk_fmunmap(const void* addr, size_t) { UnmapViewOfFile(addr); diff --git a/gfx/skia/trunk/src/utils/win/SkHRESULT.cpp b/gfx/skia/trunk/src/utils/win/SkHRESULT.cpp index 32d9d4c35c3e..111cb761bdcc 100644 --- a/gfx/skia/trunk/src/utils/win/SkHRESULT.cpp +++ b/gfx/skia/trunk/src/utils/win/SkHRESULT.cpp @@ -7,7 +7,7 @@ #include "SkTypes.h" -#include "SKHRESULT.h" +#include "SkHRESULT.h" void SkTraceHR(const char* file, unsigned long line, HRESULT hr, const char* msg) {