summaryrefslogtreecommitdiffstats
path: root/skia/ext
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Update webkit to r44571darin@chromium.org2009-06-101-10/+18
| | | | | | | | | | BUG=none TEST=none R=pkasting Review URL: http://codereview.chromium.org/119430 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18073 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a unit test failure. One of the tests sends an empty bitmap through thisbrettw@chromium.org2009-06-091-3/+1
| | | | | | | | function, which has no config, and the assertion fails. I just removed the assretion, we assume ARGB8888 everywhere. Review URL: http://codereview.chromium.org/118456 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17976 0039d316-1c4b-4281-b951-d872f2087c98
* Add a mipmap-like divide-by-two image scaling algorithm. I am going to use thisbrettw@chromium.org2009-06-093-7/+214
| | | | | | | for on-the-fly generated thumbnails. Review URL: http://codereview.chromium.org/118341 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17957 0039d316-1c4b-4281-b951-d872f2087c98
* Adds ability to change compositing operator used by CanvasPaint.sky@chromium.org2009-06-051-2/+15
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17744 0039d316-1c4b-4281-b951-d872f2087c98
* Add ability to theme our buttons.glen@chromium.org2009-06-042-0/+62
| | | | | | | | | BUG=12762 TEST=Verify that buttons can be themed. Review URL: http://codereview.chromium.org/119025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17586 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r17575 and r17576. They are causing layout test errors.agl@chromium.org2009-06-046-758/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17577 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Add support for chrooted renderers.agl@chromium.org2009-06-046-0/+758
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxSandboxIPC Without filesystem access from the renderers, we need another way of dealing with fontconfig and font loading. This add support for: * An "SBX_D" environment variable in the renderers which is used to signal the end of dynamic linking so that the chroot can be enforced. * A sandbox_host process, running outside the sandbox, to deal with fontconfig requests from the renderers. See the wiki page for the reasoning behind making it a separate process. * A new, custom SkFontHost for Skia. Because this is Chrome specific, it will live outside the upstream Skia tree. This FontHost can be configured either to drive fontconfig directly (for the browser process and for any unsandboxed renderers) or to use an IPC system. Since the same SkFontHost has to be linked into both the browser and renderer (they are the same binary), this switch has to be made at run time. Sandbox IPC calls are rare (a couple of dozen at page load time) and add about 50us of overhead for each call. http://codereview.chromium.org/112074 BUG=8081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17575 0039d316-1c4b-4281-b951-d872f2087c98
* Histogram the time we spend resampling images. We suspect this may be causingbrettw@chromium.org2009-05-201-0/+8
| | | | | | | performance problems, so it would be nice to see what average users are seeing. Review URL: http://codereview.chromium.org/113604 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16486 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Skia includes to use the whole path name.brettw@chromium.org2009-05-1925-56/+52
| | | | | | Review URL: http://codereview.chromium.org/115412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16374 0039d316-1c4b-4281-b951-d872f2087c98
* Add some missing copyright headers.senorblanco@chromium.org2009-05-152-0/+8
| | | | | | | | R=brettw Review URL: http://codereview.chromium.org/115414 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16185 0039d316-1c4b-4281-b951-d872f2087c98
* More green please: Vector canvas matrix test disable, mac fix, mark layoutsenorblanco@chromium.org2009-05-131-1/+1
| | | | | | | | | | tests failing. TBR=brettw Review URL: http://codereview.chromium.org/113342 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15952 0039d316-1c4b-4281-b951-d872f2087c98
* This CL updates chrome to the latest version of skia, retrieved via DEPS, andsenorblanco@chromium.org2009-05-136-5/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | placed in third_party. All relevant skia changes (for all 3 platforms) have been upstreamed. Most of this CL is mind-numbingly repetitive. Things of interest are: skia.gyp (now points at third_party versions), DEPS, and SkUserConfig.h. stdint.h: Skia now requires C99 integer types, which MSVC doesn't support natively. I have put typedefs in config/win/stdint.h. Note that the new version of skia appears to render rects whose coordinates are "backwards" (ie., x2 < x1 or y2 < y1), which were formerly culled. There were a couple obvious instances of this in the code which I fixed, but there may be more. There were ~35 layout test failures due to minor pixel differences which I rebaselined on Windows and Linux, and 8 genuine failures related to masks and stroked text, which I have put in text_expectations.txt and assigned to myself. (There was another change which broke ~1700 tests on each platform, but I put that change behind an #ifdef for now). R=brettw Review URL: http://codereview.chromium.org/65012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15949 0039d316-1c4b-4281-b951-d872f2087c98
* Remove executable bit from a bunch of files that shouldn't have it.evan@chromium.org2009-05-116-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
* This is the first pass at themes.glen@chromium.org2009-05-096-48/+95
| | | | | | | | | | | | This CL is paired with http://codereview.chromium.org/67284 This CL (for commit purposes) includes http://codereview.chromium.org/67284 BUG=4463,11232,11233,11234,11235 Review URL: http://codereview.chromium.org/99030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15704 0039d316-1c4b-4281-b951-d872f2087c98
* Redo of http://codereview.chromium.org/100097 to make work on Linux and Mac.glen@chromium.org2009-05-066-5/+650
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15380 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes two Linux canvas related bugs.sky@chromium.org2009-05-041-7/+6
| | | | | | | | | | | | | | | . The platform paint was allocating at a size bigger than necessary. . ChromeCanvas::DrawStringInt was not taking into account the matrix on the canvas, which means the text could be drawn at the wrong location. BUG=none TEST=none Review URL: http://codereview.chromium.org/99279 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15205 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 14712 on behalf of glen.hbono@chromium.org2009-04-286-649/+5
| | | | | | | TBR=glen Review URL: http://codereview.chromium.org/100097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14713 0039d316-1c4b-4281-b951-d872f2087c98
* Add bitmap manipulation functions in advance of themes.glen@chromium.org2009-04-286-5/+649
| | | | | | | HSLToSkColor premultiplies its output, should this instead live in the ImageOperations bitmap munging code? Review URL: http://codereview.chromium.org/79082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14712 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the ChromeCanvasPaint Linux code.deanm@chromium.org2009-04-231-1/+6
| | | | | | | | | | | | | My previous checkin was wrong, because the backing bitmap was just the damaged rect, not the entire window. Since the translation will be ignored for the cairo surface, allocate from the origin to the edge of the damage rect. Patch from Vincent Zanotti. Review URL: http://codereview.chromium.org/62149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14296 0039d316-1c4b-4281-b951-d872f2087c98
* Fix my attempt to disable part of unit test for Mac.dglazkov@chromium.org2009-04-171-1/+1
| | | | | | | | TBR=awalker Review URL: http://codereview.chromium.org/77033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13940 0039d316-1c4b-4281-b951-d872f2087c98
* Disable Path-clipping test for Mac to fix the build.dglazkov@chromium.org2009-04-171-0/+4
| | | | | | | | TBR=awalker BUG=9904 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13939 0039d316-1c4b-4281-b951-d872f2087c98
* Make non-rectangular clip region apply in the correct location.dglazkov@chromium.org2009-04-173-16/+75
| | | | | | | | | BUG=9904 R=brettw Review URL: http://codereview.chromium.org/75020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13934 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the failure to fail in PlatformCanvasWin ctorcpu@google.com2009-04-161-7/+21
| | | | | | | | | | | | | | | For a renderer CrashForBitmapAllocationFailure does not crash in any of the 4 CHECKS(), it crashes calling GetProcessMemoryInfo() - Because GetProcessMemoryInfo() tries to load PSAPI.dll and the sandbox blocks it. - Now it gives a better dump by disabling the iniling of the function - Adds a check for the shared memory, which I suspect is the real cause for some of the crashes BUG=10585 Review URL: http://codereview.chromium.org/75027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13872 0039d316-1c4b-4281-b951-d872f2087c98
* A few small improvements to ChromeCanvasPaint.deanm@chromium.org2009-04-081-13/+7
| | | | | | | | | | | | | - Don't triple buffer, we are already effectively double buffering by drawing onto a ChromeCanvas (bitmap), and then blitting. We don't need the extra GDK double buffering. - Don't translate the origin, and just blit the dirty rectangle. Review URL: http://codereview.chromium.org/63057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13344 0039d316-1c4b-4281-b951-d872f2087c98
* Now have a TextButton rendering (sort of; doesn't respond to mouse events soerg@google.com2009-03-191-0/+4
| | | | | | | | | | | I don't know if it'll draw the border correctly). Now with fixes to compile under Windows. Review URL: http://codereview.chromium.org/42427 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12172 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Now have a TextButton rendering." Broke Windows.erg@google.com2009-03-191-4/+0
| | | | | | | | | TBR=beng Review URL: http://codereview.chromium.org/50035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12163 0039d316-1c4b-4281-b951-d872f2087c98
* Now have a TextButton rendering (sort of; doesn't respond to mouse events so ↵erg@google.com2009-03-191-0/+4
| | | | | | | | | I don't know if it'll draw the border correctly). Review URL: http://codereview.chromium.org/42414 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12162 0039d316-1c4b-4281-b951-d872f2087c98
* Render into a ChromeCanvasPaint object in a RootView under Linux.erg@google.com2009-03-191-0/+69
| | | | | | | Review URL: http://codereview.chromium.org/45014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12097 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/ref_counted.h.thestig@chromium.org2009-03-182-3/+1
| | | | | | Review URL: http://codereview.chromium.org/48105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11974 0039d316-1c4b-4281-b951-d872f2087c98
* Basic windowless plugins, try 2.evan@chromium.org2009-03-134-0/+19
| | | | | | | | | | | In response to Dean's comment on http://codereview.chromium.org/39105, I redid that patch to put the X munging into the plugin implementation. This won't work for multiproc, but it's near the correct place and many things will need to be changed for multiproc. Review URL: http://codereview.chromium.org/42056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11674 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
* Linux: remove GdkSkia.*agl@chromium.org2009-03-052-608/+0
| | | | | | | | Now that we don't render with GTK, we don't need this wrapper for GDK to draw widgets via Skia. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10965 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the non-Windows builds. This makes makes the Windows code conditional on ↵brettw@chromium.org2009-03-021-0/+16
| | | | | | | | Windows. Review URL: http://codereview.chromium.org/28318 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10710 0039d316-1c4b-4281-b951-d872f2087c98
* Fix and uncomment the tests I broke in my transparency patch. Turns outbrettw@chromium.org2009-03-021-6/+4
| | | | | | | | we should only be making opaque the part of the layer that we actually drew to (since the layer opaquifier doesn't know about clip masks). Review URL: http://codereview.chromium.org/28284 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10709 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some unit tests that I broke in the transparency patch. Comment out twobrettw@chromium.org2009-02-272-4/+26
| | | | | | | more that I need to spend more time looking at. Review URL: http://codereview.chromium.org/27290 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10642 0039d316-1c4b-4281-b951-d872f2087c98
* Pull WebKit deps to get transparency fixes, and rebaseline affected layout ↵brettw@chromium.org2009-02-277-172/+23
| | | | | | | | | | | | | | | | | | | tests. Add a helper class to manage Windows' transparency issues. It will create layers and manage transforms in such a way that most effects can be achieved with fonts and form controls on Windows while looking nice. This removes the magic transparency color and associated infrastructure since it is no longer needed. This fixes semitransparent ClearType antialiasing and pngs with alpha channels with opacity applied. BUG=559,2791,3229,6372 Review URL: http://codereview.chromium.org/21201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10637 0039d316-1c4b-4281-b951-d872f2087c98
* Bitmap transportagl@chromium.org2009-02-206-16/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* From agl. Cleaned up version of issue 19046.thestig@chromium.org2009-02-034-0/+17
| | | | | | | | | | | | | POSIX: bitmap data on the wire On Windows, when drawing a given rect in the renderer, we allocate memory for the bitmap, render and send a shared memory handle across IPC. In the browser, we bitblit the shared memory to the backing store and draw it to the screen. In the long term, on Linux, we want the backingstore to be shared with both X and the renderer. The renderer then draws directly to that store, sends an IPC to the browser and the browser sends a message to X to bitblit to the display. Since only cache a few backing stores we'll need messages from the browser to tell the renderer to attach and detatch from shared memory regions as they get created and evicted. In the short term, however, to get something that works, we make a BitmapWireData typedef. This will be a shared memory region on Windows, as before, and on POSIX we'll be sending the bitmap data over the wire. Obviously this'll be pretty slow but it'll work sooner. Review URL: http://codereview.chromium.org/19491 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9065 0039d316-1c4b-4281-b951-d872f2087c98
* Implement gdk_skia_draw_segments. Initial implementation does not supportjhawkins@chromium.org2009-01-301-1/+19
| | | | | | | setting the line width or the GDK_LINE_DOUBLE_DASH style. Review URL: http://codereview.chromium.org/19521 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8992 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bunch of lint complaints in preparation to land issue 19046. Mostly ↵thestig@chromium.org2009-01-304-7/+6
| | | | | | | | formatting changes, i.e. CRLF, space at end of line. Review URL: http://codereview.chromium.org/19486 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8933 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Skia: add an option to build a canvas from a provided memory bufferagl@chromium.org2009-01-224-5/+41
| | | | | | | Review URL: http://codereview.chromium.org/18678 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8503 0039d316-1c4b-4281-b951-d872f2087c98
* Add back convolver_unittest.cc and image_operations_unittest.cc.maruel@chromium.org2009-01-223-112/+83
| | | | | | | | | | | | Fix a TODO in platform_canvas_unittest.cc. Make vector_canvas_unittest.cc slightly less dependent on base/. Remove Windows 2000 checks. (Same as r8458 with platform_canvas_unittest.cc and SConscript fixed) BUG=5113 Review URL: http://codereview.chromium.org/18511 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8498 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 8462,8458 since it broke the linux builder.maruel@chromium.org2009-01-223-75/+111
| | | | | | Review URL: http://codereview.chromium.org/18668 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8463 0039d316-1c4b-4281-b951-d872f2087c98
* Add back convolver_unittest.cc and image_operations_unittest.cc.maruel@chromium.org2009-01-223-111/+75
| | | | | | | | | | | Fix a TODO in platform_canvas_unittest.cc. Make vector_canvas_unittest.cc slightly less dependent on base/. Remove Windows 2000 checks. BUG=5113 Review URL: http://codereview.chromium.org/18623 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8458 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-211-1/+2
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up some Skia logging stuff. This unfortunately doesn't re-enable it forbrettw@chromium.org2009-01-141-20/+23
| | | | | | | | the reasons mentioned in the TODO. But I made it work much better when it is enabled. Review URL: http://codereview.chromium.org/17394 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8019 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a bunch of base dependencies from skia/ext. The only nontrivial change isbrettw@chromium.org2009-01-1410-37/+41
| | | | | | | | 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
* Hook up skia's assertions to our logging system.brettw@chromium.org2009-01-121-0/+20
| | | | | | Review URL: http://codereview.chromium.org/17285 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7889 0039d316-1c4b-4281-b951-d872f2087c98
* Move the vector canvas unit test data to the skia/ext directory. It wasn'tbrettw@chromium.org2009-01-0885-62/+36
| | | | | | | | | | | trivial to move the directory the way the test code was laid out (since we now add two levels) so I refactored it a bit to get rid of the base class (which wasn't actually used for anything useful). BUG=5016 Review URL: http://codereview.chromium.org/16550 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7756 0039d316-1c4b-4281-b951-d872f2087c98