Changeset 76974 in webkit


Ignore:
Timestamp:
Jan 28, 2011 12:39:53 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-01-28 Anders Carlsson <andersca@apple.com>

Reviewed by Adam Roben.

Add ShareableSurface class
https://bugs.webkit.org/show_bug.cgi?id=53313

  • Shared/mac/ShareableSurface.cpp: Added. (WebKit::ShareableSurface::Handle::Handle): Initialize the mach port.

(WebKit::ShareableSurface::Handle::~Handle):
Deallocate our send right if needed.

(WebKit::ShareableSurface::Handle::encode):
Encode the send right, and then null it out.

(WebKit::ShareableSurface::Handle::decode):
Decode the send right.


(WebKit::createIOSurface):
Create an IOSurface with the given size.

(WebKit::ShareableSurface::create):
Create an IOSurface, either from a size or from a handle.

(WebKit::ShareableSurface::~ShareableSurface):
Delete the texture and framebuffer.

(WebKit::ShareableSurface::createHandle):
Create a mach port from the surface.

(WebKit::ShareableSurface::attach):
Create an FBO if needed and bind it.

(WebKit::ShareableSurface::detach):
Unbind the FBO.

(WebKit::ShareableSurface::textureID):
Generate a new texture and bind it to the IOSurface.

  • Shared/mac/ShareableSurface.h: Added.
  • WebKit2.xcodeproj/project.pbxproj: Add new files.
Location:
trunk/Source/WebKit2
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r76967 r76974  
     12011-01-28  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Add ShareableSurface class
     6        https://bugs.webkit.org/show_bug.cgi?id=53313
     7
     8        * Shared/mac/ShareableSurface.cpp: Added.
     9        (WebKit::ShareableSurface::Handle::Handle):
     10        Initialize the mach port.
     11
     12        (WebKit::ShareableSurface::Handle::~Handle):
     13        Deallocate our send right if needed.
     14
     15        (WebKit::ShareableSurface::Handle::encode):
     16        Encode the send right, and then null it out.
     17
     18        (WebKit::ShareableSurface::Handle::decode):
     19        Decode the send right.
     20       
     21        (WebKit::createIOSurface):
     22        Create an IOSurface with the given size.
     23
     24        (WebKit::ShareableSurface::create):
     25        Create an IOSurface, either from a size or from a handle.
     26
     27        (WebKit::ShareableSurface::~ShareableSurface):
     28        Delete the texture and framebuffer.
     29
     30        (WebKit::ShareableSurface::createHandle):
     31        Create a mach port from the surface.
     32
     33        (WebKit::ShareableSurface::attach):
     34        Create an FBO if needed and bind it.
     35
     36        (WebKit::ShareableSurface::detach):
     37        Unbind the FBO.
     38
     39        (WebKit::ShareableSurface::textureID):
     40        Generate a new texture and bind it to the IOSurface.
     41
     42        * Shared/mac/ShareableSurface.h: Added.
     43
     44        * WebKit2.xcodeproj/project.pbxproj:
     45        Add new files.
     46
    1472011-01-27  Adam Roben  <aroben@apple.com>
    248
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r76916 r76974  
    175175                1A91010A1268C8CA001842F5 /* FindIndicatorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9101081268C8CA001842F5 /* FindIndicatorWindow.h */; };
    176176                1A91010B1268C8CA001842F5 /* FindIndicatorWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9101091268C8CA001842F5 /* FindIndicatorWindow.mm */; };
     177                1A9636BC12F348490078A062 /* ShareableSurface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A9636BA12F348490078A062 /* ShareableSurface.cpp */; };
     178                1A9636BD12F348490078A062 /* ShareableSurface.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9636BB12F348490078A062 /* ShareableSurface.h */; };
    177179                1AA1CC5D100FA1A10078DEBC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; };
    178180                1AA1CD07100FA1BA0078DEBC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; };
     
    919921                1A9101081268C8CA001842F5 /* FindIndicatorWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindIndicatorWindow.h; sourceTree = "<group>"; };
    920922                1A9101091268C8CA001842F5 /* FindIndicatorWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindIndicatorWindow.mm; sourceTree = "<group>"; };
     923                1A9636BA12F348490078A062 /* ShareableSurface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShareableSurface.cpp; sourceTree = "<group>"; };
     924                1A9636BB12F348490078A062 /* ShareableSurface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareableSurface.h; sourceTree = "<group>"; };
    921925                1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
    922926                1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
     
    23552359                        isa = PBXGroup;
    23562360                        children = (
     2361                                1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */,
     2362                                C02BFF1D1251502E009CCBEA /* NativeWebKeyboardEventMac.mm */,
    23572363                                C574A57F12E66681002DFE98 /* PasteboardTypes.h */,
    23582364                                C574A58012E66681002DFE98 /* PasteboardTypes.mm */,
    2359                                 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */,
    2360                                 C02BFF1D1251502E009CCBEA /* NativeWebKeyboardEventMac.mm */,
     2365                                BCF505E51243047B005955AE /* PlatformCertificateInfo.h */,
    23612366                                BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */,
    2362                                 BCF505E51243047B005955AE /* PlatformCertificateInfo.h */,
    23632367                                E1CC1B8F12D7EADF00625838 /* PrintInfoMac.mm */,
     2368                                1AAB4AA91296F1540023952F /* SandboxExtensionMac.mm */,
     2369                                1A9636BA12F348490078A062 /* ShareableSurface.cpp */,
     2370                                1A9636BB12F348490078A062 /* ShareableSurface.h */,
    23642371                                BC9E95D211449B0300870E71 /* UpdateChunk.cpp */,
    23652372                                BC9E95D111449B0300870E71 /* UpdateChunk.h */,
     
    23702377                                BCE231C0122C466E00D5C35A /* WebURLRequestMac.mm */,
    23712378                                BC90A1D5122DD66A00CC8C50 /* WebURLResponseMac.mm */,
    2372                                 1AAB4AA91296F1540023952F /* SandboxExtensionMac.mm */,
    23732379                        );
    23742380                        path = mac;
     
    31023108                                1A186EEA12EF7618008E5F37 /* LayerTreeHost.h in Headers */,
    31033109                                BFA6179F12F0B99D0033E0CA /* WKViewPrivate.h in Headers */,
     3110                                1A9636BD12F348490078A062 /* ShareableSurface.h in Headers */,
    31043111                        );
    31053112                        runOnlyForDeploymentPostprocessing = 0;
     
    35693576                                1A18718512EF9877008E5F37 /* LayerTreeHostMac.mm in Sources */,
    35703577                                6501BD1A12F1243400E9F248 /* WKBundleInspector.cpp in Sources */,
     3578                                1A9636BC12F348490078A062 /* ShareableSurface.cpp in Sources */,
    35713579                        );
    35723580                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.