summaryrefslogtreecommitdiffstats
path: root/skia/ext/bitmap_platform_device_mac.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant memory clears when constructing BitmapPlatformDevice ↵twiz@chromium.org2012-03-161-6/+12
| | | | | | | | | | | | | | | instances on Mac and Windows. PlatformCanvas construction is showing up as a performance bottleneck due to unnecessary initialization. The change moves the clear to the call sites where it is necessary. Note: On Linux, cairo always allocates an initialized surface, so there is no way to bypass the performance penalty. BUG=112009 TEST=All of them Review URL: http://codereview.chromium.org/9416017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127196 0039d316-1c4b-4281-b951-d872f2087c98
* Skia DEPS roll to 3147epoger@chromium.org2012-02-101-1/+2
| | | | | | Review URL: https://chromiumcodereview.appspot.com/9346023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121451 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Coverity defects in skia/ext:vandebo@chromium.org2012-01-031-3/+3
| | | | | | | | | | | | | - Three uninit ctors, two dead codes, and a misuse of var args. CID=100083, 101537, 17746, 9369, 9279, 9278 BUG=none TEST=none Review URL: http://codereview.chromium.org/8965060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116189 0039d316-1c4b-4281-b951-d872f2087c98
* Check for null contextcaryclark@google.com2011-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=69149 describes a situation where running webkit tests sporadically crashes in the Debug build. The context returned by CGContextForData is NULL, so an early return prevents the BitmapPlatformDevice constructor from firing an assert in this case. The callers already anticipate a NULL result, and will propogate the error correctly. BUG=WK69149 TEST=run webkit tests in a Debug build repeatedly Review URL: http://codereview.chromium.org/8118014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104374 0039d316-1c4b-4281-b951-d872f2087c98
* CL removing inheritance of SkDevice from PlatformDevice. twiz@google.com2011-08-281-1/+2
| | | | | | | | | | | | | PlatformDevice is now a base interface, which is implemented by the various flavours of BitmapPlatformDevice, and VectorPlatformDevice. The BitmapPlatformDevice and VectorPlatformDevice classes now inherit directly from SkDevice, or SkPDFDevice, as appropriate. PlatformDevice helper functions access the PlatformDevice interface attached to a SkDevice via meta-data on the SkDevice. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98230 Review URL: http://codereview.chromium.org/7633040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98585 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 98230 - CL removing inheritance of SkDevice from PlatformDevice. twiz@chromium.org2011-08-251-2/+1
| | | | | | | | | | | | | | | PlatformDevice is now a base interface, which is implemented by the various flavours of BitmapPlatformDevice, and VectorPlatformDevice. The BitmapPlatformDevice and VectorPlatformDevice classes now inherit directly from SkDevice, or SkPDFDevice, as appropriate. PlatformDevice helper functions access the PlatformDevice interface attached to a SkDevice via meta-data on the SkDevice. BUG=none TEST=none Review URL: http://codereview.chromium.org/7633040 TBR=twiz@chromium.org,jbates@chromium.org, dpolukhin@chromium.org, sanjeevr@chromium.org Review URL: http://codereview.chromium.org/7754001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98233 0039d316-1c4b-4281-b951-d872f2087c98
* CL removing inheritance of SkDevice from PlatformDevice. twiz@chromium.org2011-08-251-1/+2
| | | | | | | | | | | | PlatformDevice is now a base interface, which is implemented by the various flavours of BitmapPlatformDevice, and VectorPlatformDevice. The BitmapPlatformDevice and VectorPlatformDevice classes now inherit directly from SkDevice, or SkPDFDevice, as appropriate. PlatformDevice helper functions access the PlatformDevice interface attached to a SkDevice via meta-data on the SkDevice. BUG=none TEST=none Review URL: http://codereview.chromium.org/7633040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98230 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using deprecated factory API for SkDevicereed@google.com2011-07-051-11/+5
| | | | | | | Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91504 Review URL: http://codereview.chromium.org/7273013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91508 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 91504 - Stop using deprecated factory API for SkDevicereed@google.com2011-07-051-5/+11
| | | | | | | | | Review URL: http://codereview.chromium.org/7273013 TBR=reed@google.com Review URL: http://codereview.chromium.org/7193040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91505 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using deprecated factory API for SkDevicereed@google.com2011-07-051-11/+5
| | | | | | Review URL: http://codereview.chromium.org/7273013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91504 0039d316-1c4b-4281-b951-d872f2087c98
* CL removing unused copy constructor and assignment operators on ↵twiz@chromium.org2011-06-171-18/+0
| | | | | | | | | | | BitmapPlatformDevice. These classes should not have value semantics. BUG=None TEST=None Review URL: http://codereview.chromium.org/7204005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89534 0039d316-1c4b-4281-b951-d872f2087c98
* Removal of redundant method, PlatformDevice::IsVectorial. twiz@chromium.org2011-05-261-4/+0
| | | | | | | | | | Callers should use SkDevice::getDeviceCapabilities() to determine if a device is vectorial. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7077008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86894 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-261-10/+2
| | | | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86823 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86625 - This change implements a first pass in the effort to remove ↵vandebo@chromium.org2011-05-251-2/+10
| | | | | | | | | | | | | | | the dependency of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 TBR=twiz@chromium.org Review URL: http://codereview.chromium.org/6987019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86629 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-251-10/+2
| | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86625 0039d316-1c4b-4281-b951-d872f2087c98
* Update Chrome's Skia Device to use the new device factory interface ↵vandebo@chromium.org2011-04-291-4/+4
| | | | | | | | | | | | | (http://code.google.com/p/skia/source/detail?r=1180). Remove valgrind suppression. BUG=80836 TEST=NONE Review URL: http://codereview.chromium.org/6883255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83555 0039d316-1c4b-4281-b951-d872f2087c98
* mirror of http://codereview.chromium.org/6732027/reed@google.com2011-04-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace include with forward declarations. Remove #import ApplicationServices.h from platform_device_mac.h, and add it back to appropriate .cc files. This is motivated by a conflict between headers included by ApplicationServices.h and WebCore headers. The conflict occurs in WebMediaPlayerClientImpl.cpp if it modified to include platform_canvas.h. With this change, ReleaseBitmapContext() cannot be declared inline in the header, so it is moved to bitmap_platform_device_mac.cc. There is no functional change. This requires that http://trac.webkit.org/changeset/81979 land in the Chromium tree first. (81979 has landed in the WebKit tree.) Review URL: http://codereview.chromium.org/6816025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80926 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* roll skiareed@google.com2011-02-281-1/+2
| | | | | | Review URL: http://codereview.chromium.org/6588012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76216 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76069 - roll to rev. 846, includes change to SkDevice setMatrixClip() ↵reed@google.com2011-02-251-2/+1
| | | | | | | | | | | interface Review URL: http://codereview.chromium.org/6549029 TBR=reed@google.com Review URL: http://codereview.chromium.org/6596014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76070 0039d316-1c4b-4281-b951-d872f2087c98
* roll to rev. 846, includes change to SkDevice setMatrixClip() interfacereed@google.com2011-02-251-1/+2
| | | | | | Review URL: http://codereview.chromium.org/6549029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76069 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some of the more common chromium-style errors on the mac clang builder.erg@google.com2011-02-161-0/+8
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6525038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75141 0039d316-1c4b-4281-b951-d872f2087c98
* roll skia 636:673thakis@chromium.org2011-01-081-1/+2
| | | | | | | | | | | | | | | | | I need r666 (r667 and r668 are build fixes for r666. r673 fixes a regression that was introduced in r637 – found by the chromium trybots). Some code changes required due to r637, which changed the signature of a pure virtual method and the signatures of several non-virtual methods. I added OVERRIDEs on windows to let this be a compile error in the future. I also added SkBitmapCache.h/cpp to the gyp file which was added in r655. SkGradientShader depends on this. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70693 Review URL: http://codereview.chromium.org/6081006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70835 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "roll skia 636:673"thakis@chromium.org2011-01-071-2/+1
| | | | | | | | This reverts "roll skia 636:673", it broke webkit tests. I will re-checkin with suppressions later, and then update baselines after that. TBR=jar git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70700 0039d316-1c4b-4281-b951-d872f2087c98
* roll skia 636:673thakis@chromium.org2011-01-071-1/+2
| | | | | | | | | | | | | | | I need r666 (r667 and r668 are build fixes for r666. r673 fixes a regression that was introduced in r637 – found by the chromium trybots). Some code changes required due to r637, which changed the signature of a pure virtual method and the signatures of several non-virtual methods. I added OVERRIDEs on windows to let this be a compile error in the future. I also added SkBitmapCache.h/cpp to the gyp file which was added in r655. SkGradientShader depends on this. BUG=none TEST=none Review URL: http://codereview.chromium.org/6081006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70693 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/mac_util.h to base/mac and use the base::mac namespace.brettw@chromium.org2011-01-011-2/+2
| | | | | | | | | | | Fix up callers to use the new location & namespace. Remove includes from  files where it wasn't necessary. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6046009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70359 0039d316-1c4b-4281-b951-d872f2087c98
* Roll Skia deps to r621.vandebo@chromium.org2010-10-271-4/+4
| | | | | | | | | | | | Move device capabilities from device factories to the device class itself. (Skia r618) Cleanup: remove the Sk prefix from our device factories and inherit from SkDeviceFactory instead of SkRasterDeviceFactory (no real change). BUG=None TEST=None Review URL: http://codereview.chromium.org/4143002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64086 0039d316-1c4b-4281-b951-d872f2087c98
* Update use of SkCanvas and SkDevice to match change in Skia:vandebo@chromium.org2010-10-151-0/+8
| | | | | | | | | | | Refactor SkCanvas so that backends don't need to override it - instead take a device factory class. see: http://codereview.appspot.com/2103045/ BUG=New Skia devices required a corresponding canvas TEST=None Review URL: http://codereview.chromium.org/3590011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62813 0039d316-1c4b-4281-b951-d872f2087c98
* Move BitmapPlatformDevice::makeOpaque into a shared filetony@chromium.org2010-09-021-49/+0
| | | | | | | | | | | so it's implemented on all platforms. This makes the method available on Linux+Mac, while removing BitmapPlatformDevice::processPixels from Mac (doesn't appear to be used anywhere). Review URL: http://codereview.chromium.org/3227007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58274 0039d316-1c4b-4281-b951-d872f2087c98
* Move BitmapPlatformDeviceData into its own header file.tony@chromium.org2010-08-311-58/+12
| | | | | | | | | I'm trying to share some common code between the platforms so I'm starting by merging into a common header file. Review URL: http://codereview.chromium.org/3212009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58034 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 53498 to see if it is causing filterRegions.svg to fail.brettw@chromium.org2010-07-231-7/+0
| | | | | | | TBR=ctruta Review URL: http://codereview.chromium.org/3046017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53506 0039d316-1c4b-4281-b951-d872f2087c98
* Work around Skia's inability to handle degenerate bitmaps. brettw@chromium.org2010-07-231-0/+7
| | | | | | | | | | | | | This workaround is split between Chromium and WebKit. The corresponding WebKit change is available at https://bugs.webkit.org/show_bug.cgi?id=41175 BUG=37986 TEST=LayoutTests/svg/filters/filter-empty-g.svg Patch by ctruta@chromium.org Original review http://codereview.chromium.org/2965004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53498 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Fix drawing when the device's transform has a scaling part.thakis@chromium.org2010-07-161-7/+2
| | | | | | | | | | | This currently never happens in practice, but I have a patch which uses the PaintAt IPC, which doesn't work without this fix. Without this, the clip rect is scaled down too, which means if I send a PaintAt IPC that draws the renderer at 800x600 into a 400x300 pixmap, the clip rect is 200x150, because render_view sets the scale t0 0.5 and the clip rect to 400x300. BUG=none TEST=Everything still paints correctly. Review URL: http://codereview.chromium.org/3033005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52712 0039d316-1c4b-4281-b951-d872f2087c98
* Preserve optimized scrolling in the presence of multiple animating rects.darin@chromium.org2009-12-041-6/+7
| | | | | | | | | | | | | | Change PlatformCanvas so that it only fills with "sea foam green" when bitmap data is not externally supplied. Modifying the interface to make this an option bloated the CL too much. I may do this as a follow-up. Adds a new --show-paint-rects command line flag that will render a border around paint rects to help debug and study WebKit painting issues. R=brettw BUG=25905 TEST=none Review URL: http://codereview.chromium.org/414016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33861 0039d316-1c4b-4281-b951-d872f2087c98
* Adjust color spaces so that Mac Chrome renders colors properly.amanda@chromium.org2009-09-031-4/+2
| | | | | | | | | | | BUG=19951,20552 TEST=compare pages rendered in Chromium and Safari. They should appear the same. mark: review jrg/brettw: FYI Review URL: http://codereview.chromium.org/194013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25380 0039d316-1c4b-4281-b951-d872f2087c98
* Fix BitmapPlatformDevice::DrawToContext handling of NULL src_rect on Macstuartmorgan@google.com2009-07-231-5/+4
| | | | | | | | | BUG=none TEST=Crash/kill a plugin process on the Mac; sad tab should draw in the right place. Review URL: http://codereview.chromium.org/155958 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21349 0039d316-1c4b-4281-b951-d872f2087c98
* Update WebKit to 45111 and Skia to 239amanda@chromium.org2009-06-251-0/+9
| | | | | | Review URL: http://codereview.chromium.org/147121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19211 0039d316-1c4b-4281-b951-d872f2087c98
* Stop leaking CGBitmapContextRefs. Regression from r18363.mark@chromium.org2009-06-151-3/+17
| | | | | | | | BUG=14105 TEST=sh tools/valgrind/chrome_tests.sh --build_dir xcodebuild/Debug --test unit --gtest_filter=RenderWidgetHostTest.Resize Review URL: http://codereview.chromium.org/126159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18452 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CreateWithContext to Createmark@chromium.org2009-06-151-3/+5
| | | | | | Review URL: http://codereview.chromium.org/126150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18420 0039d316-1c4b-4281-b951-d872f2087c98
* Properly use data when creating a bitmap platform canvas. Gets things paintingmark@chromium.org2009-06-151-23/+47
| | | | | | | on the screen again. Regressed in r18363. Review URL: http://codereview.chromium.org/126140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18415 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the PlatformContext layer to have only one class.brettw@chromium.org2009-06-141-36/+35
| | | | | | | | | | | | | | | | | | | | | | | | | Previously we had three classes of PlatformCanvas*, one for each platform. Then we had a typedef of PlatformContext to PlatformCanvas[Mac|Win|Linux] for the specific platform. This means that it was almost impossible to forward-declare PlatformCanvas and there were a bunch of unnecessary includes of platform_canvas.h in header files. This change makes there be only one platform_canvas.h header with ifdefs, which removes a decent amount of duplicated code. There is a platform-independent file, and one platform-dependent file of platform_canvas for each platform. I also renamed PlatformDevice[Mac|Win|Linux] to PlatformDevice, althouth in this case I kept the separate headers since there was much less overlap. I also broke out CanvasPaint into separate headers so this template doesn't need to be included all over the project (only a couple of files actually need it). Review URL: http://codereview.chromium.org/125109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18363 0039d316-1c4b-4281-b951-d872f2087c98
* To help resolve the performance issue introduced when enabling the resize ↵mad@google.com2009-06-101-0/+12
| | | | | | | | corner, we now keep all non-intersecting rects separately and send an array of invalidation bitmaps via IPC as opposed to a single unionized rect :-) Review URL: http://codereview.chromium.org/108040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18090 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Skia includes to use the whole path name.brettw@chromium.org2009-05-191-5/+4
| | | | | | Review URL: http://codereview.chromium.org/115412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16374 0039d316-1c4b-4281-b951-d872f2087c98
* Remove executable bit from a bunch of files that shouldn't have it.evan@chromium.org2009-05-111-0/+0
| | | | | | | | | | (No code change.) git ls-tree -r HEAD | grep '^100755' | cut -f2 | egrep '\.(png|txt|mm|cc|h|checksum|asm|js|html|c|css|xml|grd|json)$' | xargs chmod a-x git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15809 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/ref_counted.h.thestig@chromium.org2009-03-181-1/+1
| | | | | | Review URL: http://codereview.chromium.org/48105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11974 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak of "screen size bitmap" (e.g. 1.5M if 750x548) jrg@chromium.org2009-03-071-5/+4
| | | | | | | | | | | | | | | | | that happened on *every page view* on OSX. VSIZE/RSIZE now hovers around 500M/30M instead of growing to 1.3G/260M within a few minutes. Surprisingly, Chromium.app seems quite a bit snappier! The essence of the change is that SkBitmap::setPixels() does NOT take ownership of the pointer, whereas SkBitmap::allocPixels() both allocates and owns. Review URL: http://codereview.chromium.org/39307 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11196 0039d316-1c4b-4281-b951-d872f2087c98
* Bitmap transportagl@chromium.org2009-02-201-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reworks bitmap transport on all platforms. Linux and Mac are switched from serialising bitmaps over the IPC channel to using shared memory. All platforms gain a shared memory mapping cache on the host side. The concept of a TransportDIB (device independent bitmap) is added to encapsulate most of the platform specifics. On Linux, we use SysV shared memory. This is because X shared pixmaps, which predate POSIX SHM, can only use SysV. By using SysV between renderer and browser, we open up the possibility to map the shared memory directly from the renderer to the X server. On Mac, we use POSIX shared memory. However, since this needs filesystem access and the Mac renderer is sandboxed from the filesystem, we add two new messages from renderer -> browser: The first, AllocTransportDIB, synchronously creates a transport DIB in the browser and passes a handle back to the renderer. The second, FreeTransportDIB, asynchronously, notifies the browser that it may close its handle to the shared memory region. On Mac, the shared memory regions are identified by their inode numbers on the wire. This means that the browser must keep handles open to all the allocated shared memory regions (since an inode number is insufficient to map the region). The alternative design is that the renderer passes the file descriptor with each paint operation. Since passing file descriptors is special case in the code, I felt that it would be best to minimise their use. Creating and freeing transport DIBs are relatively rare operations relative to paints and scrolls. On Windows, most of the code remains the same, except that Windows now uses the mapping cache added in this patch. This allows the browser to maintain a shared memory mapping for a transport DIB over several paints. Previously it mapped and unmapped for every operation, causing lots of TLB and VM churn. Review URL: http://codereview.chromium.org/21485 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10071 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a bunch of base dependencies from skia/ext. The only nontrivial change isbrettw@chromium.org2009-01-141-6/+10
| | | | | | | | in bitmap_platform_device_mac. The refcounting now matches the way the Windows file works. Review URL: http://codereview.chromium.org/17627 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8015 0039d316-1c4b-4281-b951-d872f2087c98
* Make Mac bitmaps use BGRA to match the MD5 hash Apple uses in its WebKit ↵pinkerton@google.com2009-01-061-2/+5
| | | | | | | | expectations. Use a png for "missingImage" because it has the color range to match the TIFF used by Apple in its expectations. Review URL: http://codereview.chromium.org/17211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7619 0039d316-1c4b-4281-b951-d872f2087c98
* Move the "platform" wrappers in skia/ext to the skia namespace.brettw@google.com2008-12-171-13/+13
| | | | | | Review URL: http://codereview.chromium.org/14110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7182 0039d316-1c4b-4281-b951-d872f2087c98