aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Fix perf regression in Color32.Gravatar senorblanco@chromium.org2010-12-16
| | | | | | | | | | | | | | | | The regression was due to the fact that we were calling PlatformColorProc() for every span (which in turns makes CPUID, a fairly expensive call). Since we draw a lot of rects, and rects have 1-pixel wide spans for the vertical segments, that's a lot of CPUID. Fixed by cacheing the result of PlatformColorProc(), as is done for the other platform-specific blitters. Review URL: http://codereview.appspot.com/3669042/ git-svn-id: http://skia.googlecode.com/svn/trunk@636 2bbb7eff-a529-9590-31e7-b0007b416f81
* Unreviewed; ARM build fix.Gravatar senorblanco@chromium.org2010-12-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@635 2bbb7eff-a529-9590-31e7-b0007b416f81
* dump message confirming read or write directoryGravatar reed@android.com2010-12-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@634 2bbb7eff-a529-9590-31e7-b0007b416f81
* SSE2 optimizations for 32bit Color operation.Gravatar senorblanco@chromium.org2010-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [Patch from weiwei.li@intel.com] SSE2 optimization has been added by Stephen White before, this improves the skia performance on SSE2-supporting platform. (please refer to below issues) Issue 171055: More SSE2ification Issue 157141: More SSE2ification Issue 150060: minor tweaks to SSE2 code for -fPIC Issue 144072: SSE2 optimizations for 32bit blending blitters This CL implements SSE2 optimizations for the 32bit Color operation. Like above issues, it uses CPUID to detect for SSE2 and changes the platform procs at runtime as well. The 32bit Color operation is heavily used on Chrome HTML5 canvas operations. Take Microsoft IE test drives Pulsating Bubbles as example (http://ie.microsoft.com/testdrive/Performance/PulsatingBubbles/Default.xhtml), if running this cases on Chrome, the overhead of 32bit Color operation is about 40~50%. So this CL will make skia performance more better, and also make Chrome HTML5 canvas performance more better. Additional, this CL has passed the skia bench & tests validation, the result is pretty good. We also apply this CL to the latest chromium, and re-run Microsoft IE test drives Pulsating Bubbles, the performance is improved by almost 9~10%. git-svn-id: http://skia.googlecode.com/svn/trunk@633 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream mulDiv255Ceil() from WebKit to the skia repository.Gravatar senorblanco@chromium.org2010-12-07
| | | | | | | | | | (Patch by Noel Gordon (noel.gordon@gmail.com)) Review URL: http://codereview.appspot.com/3466042 git-svn-id: http://skia.googlecode.com/svn/trunk@632 2bbb7eff-a529-9590-31e7-b0007b416f81
* Patch by Mike Lawther (mikelawther@chromium.org).Gravatar senorblanco@chromium.org2010-12-06
| | | | | | | | | | | | | | | | | | | | | The HTML5 canvas client of BlurDrawLooper needs the option to not apply the canvas transform to the blur offset. see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-elemen... - "The shadowOffsetX and shadowOffsetY attributes specify the distance that the shadow will be offset in the positive horizontal and positive vertical distance respectively. Their values are in coordinate space units. They are not affected by the current transformation matrix." This patch is part of fixing http://code.google.com/p/chromium/issues/detail?id=64647. Review URL: http://codereview.appspot.com/3391041/ git-svn-id: http://skia.googlecode.com/svn/trunk@631 2bbb7eff-a529-9590-31e7-b0007b416f81
* Correctly handle SkPath::kInverseWinding_FillTypeGravatar agl@chromium.org2010-12-06
| | | | | | | | | | | | | Fix for http://code.google.com/p/skia/issues/detail?id=87 Even when SkPath::kInverseWinding_FillType is given, Skia left some lines not filled(cleared) in one case. Patch-by: morrita http://codereview.appspot.com/3443041 git-svn-id: http://skia.googlecode.com/svn/trunk@630 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add flate compression test and fix bugs.Gravatar vandebo@chromium.org2010-12-02
| | | | | | Review URL: http://codereview.appspot.com/3393041 git-svn-id: http://skia.googlecode.com/svn/trunk@628 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add deflate support to SkPDFStream.Gravatar vandebo@chromium.org2010-12-01
| | | | | | Review URL: http://codereview.appspot.com/3326043 git-svn-id: http://skia.googlecode.com/svn/trunk@627 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow zero text size to be specified for an SkPaint.Gravatar vandebo@chromium.org2010-11-17
| | | | | | | | | | | | We have to support zero sized fonts and generate correct metrics to pass Acid3. There don't seem to be any requirements that textsize be >0, just that it not be negative. Original issue: http://codereview.appspot.com/3174041/ Review URL: http://codereview.appspot.com/3176042 git-svn-id: http://skia.googlecode.com/svn/trunk@626 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add safe size/copy functions to Skia.Gravatar wjmaclean@chromium.org2010-11-16
| | | | | | | | | | | | | | | | | | | | | | This patch adds four methods to SkBitmap. There are two functions to return "safe size", defined as the number of pixels from the value returned by getPixels() to the end of the allocated buffer. There is one version of fillPixels() to copy the bitmap instance into an external buffer (with specified size, and using specified stride), and another fillPixels() to copy from an external buffer to the instance bitmap. In the latter case the specified height, width and pixel format must match that used by the bitmap instance, although the specified stride may be any value at least as large as the minimum stride for the specified geometry. It is assumed that the external buffer is of size at least (height - 1)*stride + width * bytesPerPixel. Both fillPixels() functions return false if the copy is not possible with the specified parameters. Review URL: http://codereview.appspot.com/2837041/ git-svn-id: http://skia.googlecode.com/svn/trunk@625 2bbb7eff-a529-9590-31e7-b0007b416f81
* PDF: Add text support with a font framework (font embedding to come).Gravatar vandebo@chromium.org2010-11-11
| | | | | | | | | | | | Supports fakeBold, underline, strikethrough, mode (fill, stroke, both), size, skew, alignment (left, center, right). Missing is drawFontOnPath and font lookup and embedding. Changed SkPDFString to support how it is used from drawText methods. Moved compile assert into SkTypes. Moved constants and utility function used to support fakeBold, underline, and strikethrough into higher level locations. Review URL: http://codereview.appspot.com/2946041 git-svn-id: http://skia.googlecode.com/svn/trunk@624 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove include of SkGLDevice.h from SkGLCanvas.hGravatar vandebo@chromium.org2010-11-11
| | | | | | | | | | | | | | | | The '#include "SkGLDevice.h"' from include/core/SkDevice.h requires internal Skia code to be added to the include search paths when using the deprecated API. This change adds back SkGLCanvas.cpp to avoid exposing SkGLDevice.h to the public API. The change also includes an explicit virtual destructor on SkDeviceFactory to silence a -Wnon-virtual-dtor warning and allow for -Werror. Original Issue: http://codereview.appspot.com/3009041/ Review URL: http://codereview.appspot.com/2994042 git-svn-id: http://skia.googlecode.com/svn/trunk@623 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add clipping support and some small fixes.Gravatar vandebo@chromium.org2010-11-03
| | | | | | | | | | Reorganize how the PDF graphic state stack is managed (fixing several bugs incidentally). Style: fix variables with underscores. Bug: fix image matrix application order, which enabled a small refactor. Review URL: http://codereview.appspot.com/2771042 git-svn-id: http://skia.googlecode.com/svn/trunk@622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add PDF support for drawDevice using a form xobject.Gravatar vandebo@chromium.org2010-10-26
| | | | | | | | | | | This depends on: http://codereview.appspot.com/2719041 http://codereview.appspot.com/2720041 http://codereview.appspot.com/2721041 Review URL: http://codereview.appspot.com/2710042 git-svn-id: http://skia.googlecode.com/svn/trunk@621 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement SkPDFDevice::drawPath(...)Gravatar vandebo@chromium.org2010-10-26
| | | | | | | | This depends on http://codereview.appspot.com/2721041 Review URL: http://codereview.appspot.com/2722041 git-svn-id: http://skia.googlecode.com/svn/trunk@620 2bbb7eff-a529-9590-31e7-b0007b416f81
* Several cleanups:Gravatar vandebo@chromium.org2010-10-26
| | | | | | | | | | | Fix the spelling of resource in several places Make getResouce(resourceList) part of SkPDFObject make SkDynamicMemoryWStream::getOffset and SkPDFPage::getMediaBox const Add a temporary NOT_IMPLEMENTED macro instead of using SkASSERT Review URL: http://codereview.appspot.com/2721041 git-svn-id: http://skia.googlecode.com/svn/trunk@619 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move the device capability method to SkDevice.Gravatar vandebo@chromium.org2010-10-26
| | | | | | | | These are not the capabilities of the factory, but of the device. Additionally, it is more often needed when you have a device then when you have a factory, which caused creating of a new factory. Review URL: http://codereview.appspot.com/2720041 git-svn-id: http://skia.googlecode.com/svn/trunk@618 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup/unify matrix transform for PDF backend.Gravatar vandebo@chromium.org2010-10-26
| | | | | | Review URL: http://codereview.appspot.com/2719041 git-svn-id: http://skia.googlecode.com/svn/trunk@617 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix SkDraw::validate to work with vector Devices.Gravatar vandebo@chromium.org2010-10-26
| | | | | | | | Vector devices don't have a (valid) fBitmap, so pass in width and height. Review URL: http://codereview.appspot.com/2718041 git-svn-id: http://skia.googlecode.com/svn/trunk@616 2bbb7eff-a529-9590-31e7-b0007b416f81
* Bug fix in SkPDFImage.Gravatar vandebo@chromium.org2010-10-26
| | | | | | | | Need to lock the pixels to make sure they are there. Review URL: http://codereview.appspot.com/2717041 git-svn-id: http://skia.googlecode.com/svn/trunk@615 2bbb7eff-a529-9590-31e7-b0007b416f81
* First pieces of SkPDFDevice. Supports:Gravatar vandebo@chromium.org2010-10-20
| | | | | | | | | | | | Matrix transforms. Rendering bitmaps. Basic paint parameters. Rendering rectangles, points, lines, polygons. Render a paint to the page. Review URL: http://codereview.appspot.com/2584041 git-svn-id: http://skia.googlecode.com/svn/trunk@614 2bbb7eff-a529-9590-31e7-b0007b416f81
* Clamp the maximum size of glyph width we will attempt to render.Gravatar scarybeasts@gmail.com2010-10-18
| | | | | | | | Review URL: http://codereview.appspot.com/2519045 git-svn-id: http://skia.googlecode.com/svn/trunk@607 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a signedness issue with massive allocations, and also a truncation issue onGravatar scarybeasts@gmail.com2010-10-18
| | | | | | | | | | 64-bit. Review URL: http://codereview.appspot.com/2536044 git-svn-id: http://skia.googlecode.com/svn/trunk@606 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a memory leak in the new Canvas/Device workflow.Gravatar vandebo@chromium.org2010-10-15
| | | | | | | | The previous change made it difficult to inherit from SkCanvas without leaking memory. By making SkDeviceFactory not reference counted, the right thing happens more naturally, just NewCanvas : public SkCanvas(new NewDeviceFactory()) {...} Review URL: http://codereview.appspot.com/2530042 git-svn-id: http://skia.googlecode.com/svn/trunk@605 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor SkCanvas so that backends don't need to override it.Gravatar vandebo@chromium.org2010-10-13
| | | | | | | | Methods or classes that should go away are marked deprecated. The only thing I know of that breaks backward compatibility is SkCanvas((SkDevice*)NULL), but that is fairly unlikely to occur in the wild because that constructor had a default value of NULL. Review URL: http://codereview.appspot.com/2103045 git-svn-id: http://skia.googlecode.com/svn/trunk@604 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkPath::arcTo() will cause uninitialized memory reads in the following cases:Gravatar senorblanco@chromium.org2010-10-13
| | | | | | | | | | | | | | | | | | | - when the previous point in the path and (x1, y1) are coincident - when (x1, y1) and (x2, y2) are coincident These cause the setNormalize() calls to leave the "before" and "after" vectors uninitialized, respectively, which are then used to compute cosh and sinh. I chose to implement HTML5 canvas behaviour for these cases (as well as for the case where all three points are collinear): add a line to the first point, and bail. I think this is ok, since skia is mostly used for HTML5 browsers, and this case is degenerate anyway. Review URL: http://codereview.appspot.com/2484041 git-svn-id: http://skia.googlecode.com/svn/trunk@603 2bbb7eff-a529-9590-31e7-b0007b416f81
* High level pdf classes and pdf specific interface.Gravatar vandebo@chromium.org2010-10-12
| | | | | | | | The guts of the implementation will be in SkPDFDevice and below. This is a first implementation of everything above that point. Review URL: http://codereview.appspot.com/2342043 git-svn-id: http://skia.googlecode.com/svn/trunk@602 2bbb7eff-a529-9590-31e7-b0007b416f81
* Address senorblanco's comments on r600.Gravatar vandebo@chromium.org2010-10-01
| | | | | | | | | | | Don't inline constructors and destructors. Include license in test file. A few nits Also, cleanup a couple compile warnings. Review URL: http://codereview.appspot.com/2279043 git-svn-id: http://skia.googlecode.com/svn/trunk@601 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initial PDF backend commit: directories, build rules, primitivesGravatar vandebo@chromium.org2010-09-24
| | | | | | | | | This change establishes and tests the building blocks of the PDF file format. For now, PDF code is not compiled by default. Review URL: http://codereview.appspot.com/1950044 git-svn-id: http://skia.googlecode.com/svn/trunk@600 2bbb7eff-a529-9590-31e7-b0007b416f81
* call readyToDraw() instead of just checking for null pixels, since we couldGravatar reed@android.com2010-09-10
| | | | | | | | | have a bitmap with pixels, but no (required) colortable. readyToDraw() knows to check for this. git-svn-id: http://skia.googlecode.com/svn/trunk@599 2bbb7eff-a529-9590-31e7-b0007b416f81
* S32A_Blend_BlitRow32: for ARM without NEONGravatar agl@chromium.org2010-09-10
| | | | | | | | | | | | | | The S32A_Blend_BlitRow32 function was written and unrolled in ARM assembly to improve the rendering performance on ARM cores lacking NEON. Added in SkBlitRow_opts_arm.cpp. Performance improvement about ~18% on micro benchmarking. Patch-by: Vassillis git-svn-id: http://skia.googlecode.com/svn/trunk@598 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkMallocPixelRef into its own .cpp file, rather than embedding itGravatar reed@android.com2010-09-09
| | | | | | | | | | | inside SkBitmap.cpp. core_files.mk updated, but if your build does not reference that, you will need to add SkMallocPixelRef.cpp to your list git-svn-id: http://skia.googlecode.com/svn/trunk@597 2bbb7eff-a529-9590-31e7-b0007b416f81
* add abstract wrapper for platform-specific bitmap backendsGravatar reed@android.com2010-09-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@596 2bbb7eff-a529-9590-31e7-b0007b416f81
* Write S32A_Opaque_BlitRow32 function in ARM assembly.Gravatar agl@chromium.org2010-08-17
| | | | | | | | | | | | (Improves the rendering performance on ARM cores lacking NEON.) Performance improvement about ~9% on Peacekeeper rendering benchmarks. Patch by: Vasileios Laganakos (ARM) http://codereview.appspot.com/1873044/ git-svn-id: http://skia.googlecode.com/svn/trunk@595 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add versions of memset16() and memset32() in ARM assembly.Gravatar agl@chromium.org2010-08-13
| | | | | | | | | | | In benchmarks here on Cortex A9 processors, this code runs 25-30% faster than the C equivalent. Patch by: Steve McIntyre (ARM) http://codereview.appspot.com/1973042 git-svn-id: http://skia.googlecode.com/svn/trunk@594 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for TTC font files in SkFontHost_Freetype.Gravatar agl@chromium.org2010-08-06
| | | | | | | | | | | | | | This is a companion change to a Chrome CL ( http://codereview.chromium.org/2870073/show ) (Patch by: jshin (Chromium)) BUG=http://crbug.com/50389 TEST=See the Chromium CL mentioned above. http://codereview.appspot.com/1847046 git-svn-id: http://skia.googlecode.com/svn/trunk@593 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SKColorSetARGB() a macro when not building debug.Gravatar agl@chromium.org2010-07-28
| | | | | | | | | | | This allows GCC to avoid generating static initializers for code that uses it. Patch by: Dave Moore http://codereview.appspot.com/1883043/show git-svn-id: http://skia.googlecode.com/svn/trunk@592 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix precedence error.Gravatar agl@chromium.org2010-07-28
| | | | | | | Flagged as a compiler warning. It appears that it was intended that the conjuction not bind so tightly. git-svn-id: http://skia.googlecode.com/svn/trunk@591 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix matrix use in coretext fonthostGravatar reed@android.com2010-07-22
| | | | | | | | update gm images to new baseline git-svn-id: http://skia.googlecode.com/svn/trunk@590 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for SkMatrix::invert() for large coordinate values.Gravatar senorblanco@chromium.org2010-07-20
| | | | | | | | See http://codereview.appspot.com/1731053 git-svn-id: http://skia.googlecode.com/svn/trunk@589 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkRegion::setRects(), and its unit testsGravatar reed@android.com2010-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@588 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix reference bugs in font linklistGravatar reed@android.com2010-07-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@587 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added optional "ambiguous" outgoing argument to XRay queries so thatGravatar kbr@chromium.org2010-07-07
| | | | | | | | | | | | | calling code may choose different y-coordinates for better robustness. Tested and verified manually inside O3D. BUG=none TEST=none Review URL: http://codereview.appspot.com/1695051 git-svn-id: http://skia.googlecode.com/svn/trunk@586 2bbb7eff-a529-9590-31e7-b0007b416f81
* oops, also update dox for saveLayerAlphaGravatar reed@android.com2010-07-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@585 2bbb7eff-a529-9590-31e7-b0007b416f81
* update dox for saveLayer()Gravatar reed@android.com2010-07-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@584 2bbb7eff-a529-9590-31e7-b0007b416f81
* http://codereview.appspot.com/1706045/showGravatar reed@android.com2010-06-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@583 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Implementing S32A_Opaque_BlitRow32 using v7 neon instructions."Gravatar agl@chromium.org2010-06-18
| | | | | | Broke ARM build. git-svn-id: http://skia.googlecode.com/svn/trunk@582 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "We extract a sub-function from MAKENAME(_nofilter_DX), only dealing ↵Gravatar agl@chromium.org2010-06-18
| | | | | | | | with reading" Broke ARM build. git-svn-id: http://skia.googlecode.com/svn/trunk@581 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for forcing autohinting.Gravatar agl@chromium.org2010-06-17
| | | | | | http://codereview.appspot.com/1651044/show git-svn-id: http://skia.googlecode.com/svn/trunk@580 2bbb7eff-a529-9590-31e7-b0007b416f81