[Windows] Create SharedGDIObject Class Template
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2013 21:40:21 +0000 (21:40 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2013 21:40:21 +0000 (21:40 +0000)
commit9a6cd6f588a7c539741f1be97e713dbd2027ef45
treea2c01d34aec82e25209225a5364312f0e7194b51
parent2bb9596678e32efe0ddcf44b479b39bd4e2e1d50
[Windows] Create SharedGDIObject Class Template
https://bugs.webkit.org/show_bug.cgi?id=121037

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj: Remove RefCountedGDIHandle.h, and
add new SharedGDIObject.h file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hfont): Switch to new SharedGDIObject.
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/RefCountedGDIHandle.h: Removed.
* platform/graphics/win/SharedGDIObject.h: Added.
(WebCore::SharedGDIObject::create):
(WebCore::SharedGDIObject::get):
(WebCore::SharedGDIObject::hash):
(WebCore::SharedGDIObject::SharedGDIObject):

Source/WebKit/win:

* WebView.cpp: Change implementations to use the new SharedGDIObject
class.
(WebView::addToDirtyRegion):
(WebView::scrollBackingStore):
(WebView::updateBackingStore):
(WebView::performLayeredWindowUpdate):
(WebView::paint):
(WebView::backingStore):
* WebView.h: Ditto.

Source/WTF:

Now that the SharedGDIObject class exists we can get rid of
the Windows-specific code in OwnPtr.

* WTF.vcxproj/WTF.vcxproj: Remove OwnPtrWin.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* wtf/OwnPtrCommon.h:
(WTF::deleteOwnedPtr): Remove Windows declarations that
are no longer needed.
* wtf/win/GDIObject.h:
(WTF::GDIObject::get): Change to 'const' to match
signature (and use cases) elsewhere in the code base for
our smart pointer classes.
* wtf/win/OwnPtrWin.cpp: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WTF/ChangeLog
Source/WTF/WTF.vcxproj/WTF.vcxproj
Source/WTF/WTF.vcxproj/WTF.vcxproj.filters
Source/WTF/wtf/OwnPtrCommon.h
Source/WTF/wtf/win/GDIObject.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/platform/graphics/FontPlatformData.h
Source/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp
Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp
Source/WebCore/platform/graphics/win/RefCountedGDIHandle.h [deleted file]
Source/WebCore/platform/graphics/win/SharedGDIObject.h [moved from Source/WTF/wtf/win/OwnPtrWin.cpp with 55% similarity]
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit/win/WebView.h