WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-55081-20110223135025.patch (text/plain), 2.79 KB, created by
Anders Carlsson
on 2011-02-23 13:50:26 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Anders Carlsson
Created:
2011-02-23 13:50:26 PST
Size:
2.79 KB
patch
obsolete
>Index: Source/WebKit2/ChangeLog >=================================================================== >--- Source/WebKit2/ChangeLog (revision 79483) >+++ Source/WebKit2/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2011-02-23 Anders Carlsson <andersca@apple.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a ShareableBitmap::create overload that takes an existing SharedMemory object >+ https://bugs.webkit.org/show_bug.cgi?id=55081 >+ >+ * Shared/ShareableBitmap.cpp: >+ (WebKit::ShareableBitmap::createShareable): >+ (WebKit::ShareableBitmap::create): >+ * Shared/ShareableBitmap.h: >+ > 2011-02-23 Anders Carlsson <andersca@apple.com> > > Reviewed by Dan Bernstein. >Index: Source/WebKit2/Shared/ShareableBitmap.cpp >=================================================================== >--- Source/WebKit2/Shared/ShareableBitmap.cpp (revision 79472) >+++ Source/WebKit2/Shared/ShareableBitmap.cpp (working copy) >@@ -47,10 +47,20 @@ PassRefPtr<ShareableBitmap> ShareableBit > PassRefPtr<ShareableBitmap> ShareableBitmap::createShareable(const IntSize& size) > { > size_t numBytes = numBytesForSize(size); >- >+ > RefPtr<SharedMemory> sharedMemory = SharedMemory::create(numBytes); > if (!sharedMemory) > return 0; >+ >+ return adoptRef(new ShareableBitmap(size, sharedMemory)); >+} >+ >+PassRefPtr<ShareableBitmap> ShareableBitmap::create(const WebCore::IntSize& size, PassRefPtr<SharedMemory> sharedMemory) >+{ >+ ASSERT(sharedMemory); >+ >+ size_t numBytes = numBytesForSize(size); >+ ASSERT_UNUSED(numBytes, sharedMemory->size() >= numBytes); > > return adoptRef(new ShareableBitmap(size, sharedMemory)); > } >@@ -62,10 +72,7 @@ PassRefPtr<ShareableBitmap> ShareableBit > if (!sharedMemory) > return 0; > >- size_t numBytes = numBytesForSize(size); >- ASSERT_UNUSED(numBytes, sharedMemory->size() >= numBytes); >- >- return adoptRef(new ShareableBitmap(size, sharedMemory)); >+ return create(size, sharedMemory.release()); > } > > bool ShareableBitmap::createHandle(SharedMemory::Handle& handle) >Index: Source/WebKit2/Shared/ShareableBitmap.h >=================================================================== >--- Source/WebKit2/Shared/ShareableBitmap.h (revision 79472) >+++ Source/WebKit2/Shared/ShareableBitmap.h (working copy) >@@ -47,6 +47,9 @@ public: > // Create a shareable bitmap whose backing memory can be shared with another process. > static PassRefPtr<ShareableBitmap> createShareable(const WebCore::IntSize&); > >+ // Create a shareable bitmap from an already existing shared memory block. >+ static PassRefPtr<ShareableBitmap> create(const WebCore::IntSize&, PassRefPtr<SharedMemory>); >+ > // Create a shareable bitmap from a shared memory handle. > static PassRefPtr<ShareableBitmap> create(const WebCore::IntSize&, const SharedMemory::Handle&); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
sam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 55081
: 83541