summaryrefslogtreecommitdiffstats
path: root/skia
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Skia merge 279:284"agl@chromium.org2009-07-221-1/+1
| | | | | | | | | This reverts commit r21332. REVERT=21332 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21333 0039d316-1c4b-4281-b951-d872f2087c98
* Skia merge 279:284agl@chromium.org2009-07-221-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21332 0039d316-1c4b-4281-b951-d872f2087c98
* Skia merge 250:278agl@chromium.org2009-07-211-2/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21196 0039d316-1c4b-4281-b951-d872f2087c98
* Tries to retrieve all post_match_families in the font file to support non-asciiyusukes@google.com2009-07-191-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fonts. This patch should fix CHECK failures like this: yusukes@yusukes-desktop:~/chromium2/src/build$ ../sconsbuild/Release/chrome [20666:20666:544922424350:FATAL:/home/yusukes/chromium2/src/app/gfx/font_skia.cc(90)] Check failed: tf. Could not find font: IPA モナー Pゴシック Since some fonts have multiple font family names, the FontConfigDirect::Match() function should try to compare post_config_family with _all_ family names in the font, rather than with only the first (usually English) family name. For example, a popular Japanese font called ipagpmona.ttf has two family names, an English name and an internationalized (Japanese) one, and post_config_family for the font can be either the English name or the Japanese name depending on the situation. $ showttf /usr/share/fonts/truetype/ttf-ipamonafont/ipagp-mona.ttf | egrep -A 1 -e "platform=1 .* Family" platform=1 plat spec encoding=0 language=0 name=1 Family strlen=14 stroff=288 IPAMonaPGothic -- platform=1 plat spec encoding=1 language=b name=1 Family strlen=20 stroff=871 IPA <83><82><83>i<81>[ P<83>S<83>V<83>b<83>N Original review URL: http://codereview.chromium.org/155751 BUG=12530 TEST=none Review URL: http://codereview.chromium.org/159061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21063 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 20516 by re-landing this previous patch.brettw@chromium.org2009-07-176-22/+127
| | | | | | | | | | | | | Keep the cairo clipping region in sync with the Skia one. The PlatformCanvas now tracks this, so we don't need to have the similar code in gfx::Canvas. I moved most references of cairo_surface_t to cairo_t since the cairo_t has a transform and clip but the surface does not. Review URL: http://codereview.chromium.org/149409 Review URL: http://codereview.chromium.org/155700 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20992 0039d316-1c4b-4281-b951-d872f2087c98
* Fix line endings.brettw@chromium.org2009-07-173-250/+250
| | | | | | Review URL: http://codereview.chromium.org/155702 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20981 0039d316-1c4b-4281-b951-d872f2087c98
* Make our HSL shifting match Photoshop's.glen@chromium.org2009-07-154-69/+46
| | | | | | | | | | Also clean up a bunch of PMColor code - skia_utils should operate on SkColors and PMColors should only ever be used by SkBitmaps and ImageOperations. BUG=16687 Review URL: http://codereview.chromium.org/149663 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20788 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: filter out unreadable fontsagl@chromium.org2009-07-141-0/+8
| | | | | | | | | | | Fontconfig will return fonts which are unreadable to the current process if the system cache contains them. BUG=16715 http://codereview.chromium.org/149628 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20663 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: workaround a fontconfig bug.agl@chromium.org2009-07-141-8/+31
| | | | | | | | | | Fontconfig cannot filter out non-scalable fonts on Hardy. http://codereview.chromium.org/149482 BUG=16411 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20604 0039d316-1c4b-4281-b951-d872f2087c98
* This enables the Windows and Mac font host, and disables the fake font host ↵gspencer@google.com2009-07-131-9/+3
| | | | | | | | | | that Chrome currently uses. This will be necessary to integrate O3D into Chrome, since we use Skia to render text in our canvas. TEST=run chrome with canvas drawing text BUG=none Review URL: http://codereview.chromium.org/150175 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20521 0039d316-1c4b-4281-b951-d872f2087c98
* Revert previous clipping rect change for Cairo to see if it fixes the build.brettw@chromium.org2009-07-136-127/+22
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20516 0039d316-1c4b-4281-b951-d872f2087c98
* Keep the cairo clipping region in sync with the Skia one.brettw@chromium.org2009-07-136-22/+127
| | | | | | | | | | The PlatformCanvas now tracks this, so we don't need to have the similar code in gfx::Canvas. I moved most references of cairo_surface_t to cairo_t since the cairo_t has a transform and clip but the surface does not. Review URL: http://codereview.chromium.org/149409 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20499 0039d316-1c4b-4281-b951-d872f2087c98
* Draw the image at the origin rather than one pixel to the right.avi@chromium.org2009-07-101-1/+1
| | | | | | | | | BUG=none TEST=favicons, images shouldn't be shifted, left edge shouldn't be broken Review URL: http://codereview.chromium.org/149473 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20405 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: don't crash when performing font fallback to a non-scalable font.agl@chromium.org2009-07-101-10/+4
| | | | | | | | | | | | | | | Previously we were filtering out non-scalable fonts /after/ the fact. This patch changes it so that we specify to fontconfig that it shouldn't return non-scalable fonts to us. We also duplicate this code into WebFontInfo so that we don't get these issues when performing glyph-fallback. http://codereview.chromium.org/149437 BUG=16403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20351 0039d316-1c4b-4281-b951-d872f2087c98
* Remove svn:executable property from files that don't need it.thestig@chromium.org2009-07-081-0/+0
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/155199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20161 0039d316-1c4b-4281-b951-d872f2087c98
* Make font fallback case insensitive.thestig@chromium.org2009-07-081-3/+4
| | | | | | | | BUG=16047 TEST=Go to a site that has css with font-family: sans on Debian Lenny. Review URL: http://codereview.chromium.org/149292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20123 0039d316-1c4b-4281-b951-d872f2087c98
* A null CGImageRef should be treated as a "null" SkBitmap,darin@google.com2009-07-031-1/+2
| | | | | | | | | | | | | | | | | | one in which isNull() returns true. This assertion was being tripped as a result of some recent changes I made to expose a CGImageRef as the basis or a WebKit::WebImage. I think it makes sense to put this null check in CGImageToSkBitmap instead of at each callsite. TEST=covered by mac ui tests BUG=none TBR=mark Review URL: http://codereview.chromium.org/149173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19900 0039d316-1c4b-4281-b951-d872f2087c98
* Include gdk.h in canvas_paint_linux.h, it uses gdk_cairo_create.deanm@chromium.org2009-07-011-0/+2
| | | | | | | Review URL: http://codereview.chromium.org/151147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19732 0039d316-1c4b-4281-b951-d872f2087c98
* Enable some skia unittests on linux and mac.tc@google.com2009-07-011-6/+6
| | | | | | | | | | This enables the ImageOperations.* and SkiaUtils.* test_shell_tests on linux and mac. Review URL: http://codereview.chromium.org/151097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19701 0039d316-1c4b-4281-b951-d872f2087c98
* Add favicons to tabs on the Mac. Also moved SkBitmapToNSImage() toavi@chromium.org2009-06-253-0/+88
| | | | | | | | | | | | | skia/ext/skia_utils_mac.h and removed chrome/browser/cocoa/cocoa_utils.h. Patch by rsesek. BUG=13565 http://codereview.chromium.org/131018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19266 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting r19244 as it unintentionally broke ui tests: ↵avi@chromium.org2009-06-253-89/+0
| | | | | | OtherRedirectsDontForkProcess InEmptyFrame TestLifetimeOfDomAutomationController git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19245 0039d316-1c4b-4281-b951-d872f2087c98
* Add favicons to tabs on the Mac. Also moved SkBitmapToNSImage() toavi@chromium.org2009-06-253-0/+89
| | | | | | | | | | | | | | skia/ext/skia_utils_mac.h and removed chrome/browser/cocoa/cocoa_utils.h. Patch by rsesek. BUG=13565 Review URL: http://codereview.chromium.org/131018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19244 0039d316-1c4b-4281-b951-d872f2087c98
* Update Skia transfer modes for Skia r239amanda@chromium.org2009-06-251-4/+4
| | | | | | Review URL: http://codereview.chromium.org/146134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19217 0039d316-1c4b-4281-b951-d872f2087c98
* Update WebKit to 45111 and Skia to 239amanda@chromium.org2009-06-254-3/+26
| | | | | | Review URL: http://codereview.chromium.org/147121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19211 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix double italic on some fonts.agl@chromium.org2009-06-241-2/+15
| | | | | | | | | | | | | | If we ask fontconfig for an italic font, it might take a roman font and set the undocumented property FC_MATRIX to a skew matrix. It'll then say that the font is italic or oblique. So, if we see a matrix, we don't believe that it's italic. BUG=15212 http://codereview.chromium.org/147108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19184 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix fake italics for fonts without italic variants.agl@chromium.org2009-06-246-29/+53
| | | | | | | | | | | | | | | Before this patch we assumed that the style which we got from fontconfig was the one that we asked for. Rather than do this we need to query the resulting style and plumb that back into WebKit. Once WebKit knows that there's a mismatch between the request and actual styles it can trigger faking. BUG=14810 http://codereview.chromium.org/147005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19095 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 19043.thakis@chromium.org2009-06-231-1/+0
| | | | | | Review URL: http://codereview.chromium.org/146058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19081 0039d316-1c4b-4281-b951-d872f2087c98
* Bring in a patch to skia that's required forthakis@chromium.org2009-06-231-0/+1
| | | | | | | | | | | http://codereview.chromium.org/141037 . BUG=http://crbug.com/14020 TEST=none Review URL: http://codereview.chromium.org/146003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19043 0039d316-1c4b-4281-b951-d872f2087c98
* Only select scalable fonts. Fixed-size fonts don't work with ↵thestig@chromium.org2009-06-191-0/+10
| | | | | | | | | | FT_Set_Char_Size in SkFontHost_FreeType.cpp. BUG=13007 TEST=On Linux, visit url with { font-family: fixed; } on a computer with pcf fonts. Review URL: http://codereview.chromium.org/131096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18832 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting r18743.avi@google.com2009-06-183-174/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18755 0039d316-1c4b-4281-b951-d872f2087c98
* Add favicons to tabs on the Mac. Also moved SkBitmapToNSImage() toavi@google.com2009-06-183-0/+174
| | | | | | | | | | | | | | skia/ext/skia_utils_mac.h and removed chrome/browser/cocoa/cocoa_utils.h. Patch by rsesek. BUG=13565 Review URL: http://codereview.chromium.org/131018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18743 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a skia valgrind error.craig.schlenter@chromium.org2009-06-181-1/+1
| | | | | | Review URL: http://codereview.chromium.org/134001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18710 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: move SyncIPC function from Skia to base.agl@chromium.org2009-06-181-43/+4
| | | | | | | | | I'll be needing in some pending WebKit changes. http://codereview.chromium.org/131006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18676 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/125205mark@chromium.org2009-06-161-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18519 0039d316-1c4b-4281-b951-d872f2087c98
* Add file icons to chrome://downloads/ on the Mac. Add Skia helpermark@chromium.org2009-06-164-88/+182
| | | | | | | | | | CGImageToSkBitmap(). Patch by Robert Sesek <rsesek@bluestatic.org> Review URL: http://codereview.chromium.org/118488 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18517 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
* Linux: fix memory leak in new SkFontHost code.agl@chromium.org2009-06-151-0/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18424 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CreateWithContext to Createmark@chromium.org2009-06-153-9/+10
| | | | | | 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-153-37/+60
| | | | | | | 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
* Linux: remove some unused structures from SkFontHost_fontconfig_ipc.hagl@chromium.org2009-06-151-26/+0
| | | | | | | | (These were a merge artifact from r18405 which additionally broke the build on GCC 4.4). git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18413 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix layout tests with italic text.agl@chromium.org2009-06-151-1/+1
| | | | | | | | I had a typo in r18405 which meant that italic text wasn't actually italic. This broke, ah, 'several' layout tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18411 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Add support for chrooted renderers.agl@chromium.org2009-06-158-2/+771
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (Reland of r17575 which was reverted in r17577) http://codereview.chromium.org/112074 BUG=8081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18405 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the PlatformContext layer to have only one class.brettw@chromium.org2009-06-1431-908/+775
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add favicons to Mac bookmark bar.jrg@chromium.org2009-06-131-1/+9
| | | | | | | | | | | | BUG=8381 TEST=Open bookmark bar (Cmd-B). Add some bookmarks with sites that have favicons (cnn.com). See icons in bookmark buttons. Make sure color is correct. Review URL: http://codereview.chromium.org/125061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18340 0039d316-1c4b-4281-b951-d872f2087c98
* Remove misleading comment - we no longer crash when CreateDIBSection() fails,brettw@google.com2009-06-111-6/+0
| | | | | | | | | | | | | | just return null Also remove unused GetLastError() call; no error is being returned anyway. R=brettw BUG=http://crbug.com/10977 TEST=none Original review: http://codereview.chromium.org/120006 Patch by dpranke@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18195 0039d316-1c4b-4281-b951-d872f2087c98
* Update DEPS to pull in upstream changes that remove RGBA32Buffer::bitmap(), ↵pkasting@chromium.org2009-06-111-2/+6
| | | | | | | | | | | | | | | | and rewrite local tests to compile. Also pulls in a change that upstreamed V8CustomBinding, since that got bracketed between my upstream changes; this includes the Chromium side of that too. This change exposed a deficiency in the XBM testing where we were erroneously using a zero-length set of image data to calculate the MD5 sum (because we were using the buffer rect instead of the image size, and the XBM decoder wasn't correctly setting the rect). Fixed the test to use the image size (which is more correct for this application), will fix the XBM decoder upstream to set the rect correctly. This in turn required generating new MD5 sums, which required patching the generation code (which is normally #ifdefed away) to also work with the past couple years of changes. This commit will need to land at the same time as one that updates the expected sums; during the period where either commit is in place without the other, the XBM decoding tests will fail. BUG=13633 TEST=Covered by unittests Review URL: http://codereview.chromium.org/121001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18131 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
* 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