summaryrefslogtreecommitdiffstats
path: root/skia/ext
Commit message (Collapse)AuthorAgeFilesLines
* Fixed build failure on linux and mac. PlatformDevice::makeOpaque is only ↵alokp@chromium.org2011-04-131-2/+4
| | | | | | | | | present on windows! TBR=reed@google.com Review URL: http://codereview.chromium.org/6834029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81429 0039d316-1c4b-4281-b951-d872f2087c98
* Added skia::MakeOpaque helper function needed to rid WebKit of ↵alokp@chromium.org2011-04-132-0/+8
| | | | | | | | PlatformCanvas/Device dependency. Review URL: http://codereview.chromium.org/6835025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81428 0039d316-1c4b-4281-b951-d872f2087c98
* Push the initial transform down into SkPDFDevice. (Chrome side).vandebo@chromium.org2011-04-122-52/+16
| | | | | | | | | | | This change also rolls skis to r1111 to get the Skia side of the change. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6820038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81267 0039d316-1c4b-4281-b951-d872f2087c98
* Connect the right metafiles for print preview on Linux and Windows.vandebo@chromium.org2011-04-111-3/+3
| | | | | | | | | | | | | | + Remove the NativeMetafileFactory since we can't just use preview flag. + Update each Metafile constructor site to use PreviewMetafile or NativeMetafileImpl. + Fix misc. problems blocking pdf generation on Windows. + Rename the metafile interface. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6826027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81161 0039d316-1c4b-4281-b951-d872f2087c98
* Chromium does native painting on a very specific device - a device retrieved ↵alokp@chromium.org2011-04-111-12/+12
| | | | | | | | | through a layer iterator. This device is neither SkCanvas::getDevice() or SkCanvas::getTopDevice(). We changed it to do native painting on SkCanvas::getDevice() in r80955 which resulted in numerous regressions. This patch reverts to using the same device used pre r80955. BUG=78891 Review URL: http://codereview.chromium.org/6826040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81143 0039d316-1c4b-4281-b951-d872f2087c98
* Added skia::SupportsPlatformPaint for webkit to query whether it can use ↵alokp@chromium.org2011-04-112-0/+13
| | | | | | | | native API to draw on a particular canvas. Review URL: http://codereview.chromium.org/6820037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81107 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate skia::PlatformCanvas, a subclass of SkCanvas. Skia provides ↵alokp@chromium.org2011-04-082-0/+33
| | | | | | | | | | | | | | | | multiple types of SkCanvas classes that we would like to use. Unfortunately these classes are implemented as subclasses of SkCanvas. Subclassing SkCanvas in both Skia and Chromium makes it impossible to dynamically use any SkCanvas. There is also no reason for chromium to subclass SkCanvas. Most of the extra functionalities can be implemented by hanging meta-data from SkCanvas. We cannot eliminate skia::PlatformCanvas in one step due to WebKit's dependency on skia::PlatformCanvas. WebKit::WebCanvas is typedef as skia::PlatformDevice. It should be SkCanvas. So we need to do it in multiple steps: 1. Prepare Chromium tree for the change in WebKit::WebCanvas tyepdef. This basically means adding a couple of static_cast<skia::PlatformCanvas>(WebCanvas). 2. Change WebKit::WebCanvas typedef from skia::PlatformCanvas to SkCanvas 3. Eliminate skia::PlatformCanvas in chromium This CL accomplishes the first step on windows. WebKit BUG=https://bugs.webkit.org/show_bug.cgi?id=57563 Review URL: http://codereview.chromium.org/6783023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80955 0039d316-1c4b-4281-b951-d872f2087c98
* mirror of http://codereview.chromium.org/6732027/reed@google.com2011-04-085-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fade tab titlessail@chromium.org2011-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | This change fades tab titles instead of truncating them with a "...". I tried to copy the Mac implemenation from here: http://code.google.com/p/google-toolbox-for-mac/source/browse/trunk/AppKit/GTMFadeTruncatingTextFieldCell.m but my version is not as good since I couldn't figure out how to draw text on a transparent background. BUG=69301 TEST=Ran Chromium and verified that things looked ok. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80416 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80748 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80870 Review URL: http://codereview.chromium.org/6695043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80891 0039d316-1c4b-4281-b951-d872f2087c98
* + This CL pulls in all the PDF code (i.e. we are now compiling the PDF ↵vandebo@chromium.org2011-04-082-0/+360
| | | | | | | | | | | | | | | | | backend on Chrome). + Add a Metafile to contain Skia PDF content. + Add a VectorPlatformDevice for use with the Skia PDF backend. BUG=62889 TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80841 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=80857 Review URL: http://codereview.chromium.org/6499024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80873 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80841 - + This CL pulls in all the PDF code (i.e. we are now ↵vandebo@chromium.org2011-04-072-360/+0
| | | | | | | | | compiling the PDF backend on Chrome).+ Add a Metafile to contain Skia PDF content.+ Add a VectorPlatformDevice for use with the Skia PDF backend.BUG=62889TEST=NONEReview URL: http://codereview.chromium.org/6499024 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6814028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80857 0039d316-1c4b-4281-b951-d872f2087c98
* + This CL pulls in all the PDF code (i.e. we are now compiling the PDF ↵vandebo@chromium.org2011-04-072-0/+360
| | | | | | | | | | | | | | backend on Chrome). + Add a Metafile to contain Skia PDF content. + Add a VectorPlatformDevice for use with the Skia PDF backend. BUG=62889 TEST=NONE Review URL: http://codereview.chromium.org/6499024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80841 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a few styles issues in skia::PlatformDevice. Made function names ↵alokp@chromium.org2011-04-0618-30/+50
| | | | | | | | consistent. Added Begin/EndPlatformPaint on Mac. Review URL: http://codereview.chromium.org/6691067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80707 0039d316-1c4b-4281-b951-d872f2087c98
* Remove empty header and references to it: platform_canvas_win.hvandebo@chromium.org2011-04-063-17/+5
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6804022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80676 0039d316-1c4b-4281-b951-d872f2087c98
* rename getBitmapDC to beginPlatformPaint and add calls to endPlatformPaintvandebo@chromium.org2011-04-0510-24/+33
| | | | | | | | | | | This takes a step toward unifying the platform device interface between Windows and Linux and helps to make VectorPlatformDeviceSkia have less ifdefs. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6677142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80474 0039d316-1c4b-4281-b951-d872f2087c98
* Rename some printing classes and minor cleanups.vandebo@chromium.org2011-04-048-249/+230
| | | | | | | | | | | | | | | | Rename: PdfPsMetafile -> PdfMetafileCairo PdfMetafile -> PdfMetafileCg (Mac) VectorPlatformDevice -> VectorPlatformDeviceEmf/Cairo (Windows/Linux varients) This is in preparation for VectorPlatformDeviceSkia. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6783036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80390 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability to write comments to PNGCodec::Encode.tony@chromium.org2011-03-282-4/+6
| | | | | | | | | I'm going to use this to write layout test checksums to the expected png files. Review URL: http://codereview.chromium.org/6696085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79592 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-284-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* SK_API isn't needed on ConvolutionFilter1D::FilterInstance.ctguil@chromium.org2011-03-231-1/+1
| | | | | | | | | | - Minor cleanup from http://codereview.chromium.org/6674050/ BUG=none TEST=none Review URL: http://codereview.chromium.org/6713015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79142 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-219-97/+24
| | | | | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78812 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78815 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78859 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78860 Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78935 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78859 - Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-219-24/+97
| | | | | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78812 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78815 Review URL: http://codereview.chromium.org/6665046 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6711067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78860 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-219-97/+24
| | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78812 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78815 Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78859 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78812 - Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-199-24/+97
| | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Review URL: http://codereview.chromium.org/6665046 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6708046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78815 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-199-97/+24
| | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78812 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78662 - Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-189-23/+96
| | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6665046 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6713029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78663 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-189-96/+23
| | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78662 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for windows shared build compile failure.ctguil@chromium.org2011-03-171-14/+15
| | | | | | | | | TBR=bsalomon@chromium.org BUG=none TEST=compile test_shell_tests.exe Review URL: http://codereview.chromium.org/6674050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78515 0039d316-1c4b-4281-b951-d872f2087c98
* Build skia as a dll in windows multi-dll build. ctguil@chromium.org2011-03-176-7/+10
| | | | | | | | BUG=75686 TEST=none Review URL: http://codereview.chromium.org/6682011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78510 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang mac compile error.ctguil@chromium.org2011-03-172-1/+5
| | | | | | | | | | | - [chromium-style] virtual methods with non-empty bodies shouldn't be declared inline. TBR=vandebo BUG=none TEST=none Review URL: http://codereview.chromium.org/6672069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78503 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang compile error.ctguil@chromium.org2011-03-172-1/+5
| | | | | | | | | | | | - [chromium-style] virtual methods with non-empty bodies shouldn't be declared inline. TBR=vandebo BUG=none TEST=none Review URL: http://codereview.chromium.org/6674048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78494 0039d316-1c4b-4281-b951-d872f2087c98
* Add IsNativeFontRenderingAllowed to other platform device headers.ctguil@chromium.org2011-03-172-0/+6
| | | | | | | | - Currently only the windows header has this function. Review URL: http://codereview.chromium.org/6667060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78482 0039d316-1c4b-4281-b951-d872f2087c98
* Provide a function that WebKit can use to determine if GDI text rendering is ↵ctguil@chromium.org2011-03-121-0/+3
| | | | | | | | | | | allowed on a PlatformDevice. BUG=none TEST=none Review URL: http://codereview.chromium.org/6681021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77924 0039d316-1c4b-4281-b951-d872f2087c98
* SIMD implementation of Convolver for Lanczos filter etc.jiesun@chromium.org2011-03-094-27/+661
| | | | | | | | | | | replace current convolver function (horizontal/vertical) with SSE2 intrinsic version. Performance is not tuned to the optimal carefully in this patch. but it still should beat C version easily. BUG=62820 TEST=unittest. and image_operation_bench. Review URL: http://codereview.chromium.org/6334070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77527 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r76709 "Revert r71208 "Mac: Explicitly set the colorspace on SkBitmap ↵chase@chromium.org2011-03-032-3/+17
| | | | | | | | | | | | | | -> CGImageRef ..."" There was no change to vm_rss_final_b in mac-release-10.5/intl2, so reverting this change. BUG=74775 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/6609013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76712 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r71208 "Mac: Explicitly set the colorspace on SkBitmap -> CGImageRef ↵chase@chromium.org2011-03-032-17/+3
| | | | | | | | | | | | | | | conversions" This is a test to look for the cause of a steady vm_rss_final_b regression on the Mac 10.5 intl2 page cycler. BUG=74775 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/6609010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76709 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove some simple instances of ToWStringHackevan@chromium.org2011-03-021-2/+2
| | | | | | | | BUG=69467 Review URL: http://codereview.chromium.org/6588131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76630 0039d316-1c4b-4281-b951-d872f2087c98
* roll skiareed@google.com2011-02-2811-12/+25
| | | | | | 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-2511-25/+12
| | | | | | | | | | | 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-2511-12/+25
| | | | | | 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-162-4/+10
| | | | | | | | | 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
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-052-2/+2
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Integration of most changes from the GoogleTV project around the ↵brettw@chromium.org2011-01-307-60/+1135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | convolver/scaler. This contains the following improvements: - Adding a few extra convolution filters on top of the existing LANCZOS3 (used internally in Chrome), and BOX (used in unit tests): - LANCZOS2: a variation of LANCZOS3 except that the windowed function is limited to the [-2:2] range. - HAMMING1: this uses a Hamming window using the [-1:-1] range. If we define the zoom down factor to z, and w the size of the window, the actual cost of each filter (CPU wise) is proportional to (w * 2 * z + 1). So, if we look at what happens when you zoom down by a factor of 4 (as often found when creating thumbnails), the cost would be 25 for LANCZOS3, 17 for LANCZOS2, and 9 for HAMMING. As a result, HAMMING1 can end up be roughly three times as fast as the typical LANCZOS3. In terms of visual quality, HAMMING1 will be obviously worse than filters that have a larger window. The motivation of this change is that not all processors are equally equipped, and while LANCZOS3 does provide good quality, it will be completely inadequate in speed on slower processors (as found on Google TV), and it would be worth trading some visual quality for speed. Because the definitions of what is acceptable from one platform to another will differ, this change adds generic enums describing various trade offs between quality and speed. And depending on the platform, these would then be mapped to different filters. This change does not contain the other changes made to the all the call sites to transform LANCZOS3 to the appropriate enum. Another CL will have to be checked in for the policy definition. - Improvements in speed by around 10% (the actual speed up depends on the parameters of the scale (scale ratios, sizes of images), as well as the actual processor on which this is run on. The 10% was measured on scale down of 1920x1080 images to 1920/4x1080/4 using the LANCZOS3 filter on a 32bit Atom based using the image_operations_bench. Actual numbers for a 64bit processor are discussed below. This optimization attempts to basically eliminate all zeroes on each side of the filter_size, since it is very likely that the calculated window will go one fraction of a pixel outside of the window where the function is actuall not zero. In many cases, this means it gets rid the convolution by one point. So, using the math above, (w * 2 * z + 1) will have 1 subtracted. The code though is generic and will get rid of more points if possible. - To measure speed, a small utility image_operations_bench was added. Its purpose is to simply measure speed of the actual speed of the convolution without any regards to the actual data. Run with --help for a list of options. The actual measured number is in MB/s (source MB + dest MB / time). The following numbers were found on a 64 bit Release build on a z600: | zero optimization | Filter | no | yes | Hamming1 | 459 | 495 | Lanczos2 | 276 | 294 | Lanczos3 | 202 | 207 | The command line was: for i in HAMMING1 LANCZOS2 LANCZOS3 ; do echo $i; out/Release/image_operations_bench -source 1920x1080 -destination 480x270 -m $i -iter 50 ; done The actual improvements for the zero optimization mentioned above are much more prevalent on a 32bit Atom. - Commented that there is half-pixel error inside the code in image_operations. Because this would effectively changes the results of many scales that are used in win_layout tests, this would effectively break them. As a result, the change here only adds comments about what needs to be changed, but does not fix the issue itself. A subsequent change will remove the comments and enable the fix, and also adds the corrected reference images used for the test. See bug 69999: http://code.google.com/p/chromium/issues/detail?id=69999 - Enhanced the convolver to support arbitrary strides, instead of the hard coded 4 * width. This value is correct on most platforms, but is not on GoogleTV since buffers allocated need to be 32 pixel multiples to exploit HW capabilities. - Added numerous unit tests to cover the new filters as well as adding other ones that are more rigourous than the existing ones. Such a test is the reason, we have found the half pixel error mentioned above. TEST=This was tested against the existing unit tests, and the added unit tests on a 64 bit Linux platform. The tests were then ran under valgrind to check for possible memory leaks/ and errors. The tests do come out clean (except the preexisting file descriptor 'leaks' coming from other tests that are linked with test_shell_tests Actual credit to most of the actual changes go to various contributors of the Google TV team. Note that there are two types of optimizations that are possible beyond these changes that are not done here: 1/ Use the fact that the filter coefficients will be periodic to reduce the cost of calculating the coefficients (though typically in the noise), but rather when the convolution is done to decrease cache misses on the coefficients. Experiments showed that on an Atom, this can yield 5 % improvement. 2/ This code is the prime target for the use of SIMD instructions. BUG=47447, 62820, 69999 Patch by evannier@google.com Original review http://codereview.chromium.org/5575010/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73110 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-211-7/+7
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE in the same places the windows version of the file has them.thakis@chromium.org2011-01-181-22/+25
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6292003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71669 0039d316-1c4b-4281-b951-d872f2087c98
* Add font-equivalent mapping for a few Chinese/Japanese fonts for CrOS.jshin@chromium.org2011-01-131-23/+74
| | | | | | | | | | | | | | | | | | | | | | The following aliases are added to be recognized in addition to what we have. The first four are applicable to Chrome on Linux and ChromeOS. The last two are for Chrome OS. IPAPMincho -> MS P Mincho IPAMincho -> MS Mincho IPAPGothic -> MS P Gothic IPAGothic -> MS Gothic Song ASC -> Simsun N Song ASC -> NSimsun BUG=65382,chromium-os:10182,chromium-os:8757 TEST=Install IPA fonts on Linux and make sure that Windows Japanese fonts are not installed on your machine. Also, add what's added in http://codereview.chromium.org/5695005/ to your copy of /etc/fonts/local.conf. And, load cjfontalias.html attached to http://crosbug.com/10182 to make sure that all three columns look identical (each rows should be different). Review URL: http://codereview.chromium.org/5578008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71295 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Explicitly set the colorspace on SkBitmap -> CGImageRef conversions.thakis@chromium.org2011-01-122-3/+17
| | | | | | | | | | | | | The color space was hardcoded as "generic rgb" in skia. This is not always correct, also skia is changing this color space around a lot currently. To protect us from their unreliable default, hardcode "generic rgb" as default on our side for now, but make it possible for clients to provide their own color space. Use this to let tabpose and the favicon code pass in the device colorspace. BUG=24267,50307 TEST=Open tabpose. Delayed thumbnails should look like backing-store backed thumbnails. The colors of favicons should now match other browsers. Review URL: http://codereview.chromium.org/6117006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71208 0039d316-1c4b-4281-b951-d872f2087c98
* When printing a page containing alpha blending on a printer which doesn't ↵senorblanco@chromium.org2011-01-122-1/+8
| | | | | | | | | | | | | support alpha blending, post-process the metafile to replace the AlphaBlend calls with BitBlts from a software-composited rendering of the page so far. BUG=7434 TEST=see bug Review URL: http://codereview.chromium.org/5362002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71177 0039d316-1c4b-4281-b951-d872f2087c98
* roll skia 636:673thakis@chromium.org2011-01-0813-28/+55
| | | | | | | | | | | | | | | | | 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
* Start sorting methods in class declarations.erg@google.com2011-01-074-54/+52
| | | | | | | | | | | | | | | | | | | | | | | | A lot of our headers are a mess and aren't organized. Impose the following order on files in the base/ directory: class Blah { each public/protected/private section: typedefs; enums; static constants; ctors; dtors; methods; overridden virtual methods; data members; }; BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70749 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "roll skia 636:673"thakis@chromium.org2011-01-0713-55/+28
| | | | | | | | 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