Commit Graph

846 Commits

Author SHA1 Message Date
ctguil@chromium.org
9db86bb9cd PDF Type3 Support.
git-svn-id: http://skia.googlecode.com/svn/trunk@892 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 21:43:27 +00:00
bsalomon@google.com
5aaa69e433 Fixups for clipstack, convexity test for paths.
Review URL http://codereview.appspot.com/4250056/

git-svn-id: http://skia.googlecode.com/svn/trunk@891 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 20:29:08 +00:00
ctguil@chromium.org
f7c2c4544f Update windows port of of SkFontHost::GetAdvancedTypefaceMetrics to use calculateGlyphCount.
Review URL: http://codereview.appspot.com/4245060

git-svn-id: http://skia.googlecode.com/svn/trunk@890 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 19:39:56 +00:00
reed@google.com
eca7d34f1d fix () warning
git-svn-id: http://skia.googlecode.com/svn/trunk@889 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 19:33:13 +00:00
ctguil@chromium.org
0bc7bf5fe4 Implement SkScalerContext_Windows::generateGlyphCount() and provide access via SkGlyphCache interface.
* This will be used by PDF font code.

Review URL: http://codereview.appspot.com/4261042

git-svn-id: http://skia.googlecode.com/svn/trunk@888 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 19:04:57 +00:00
ctguil@chromium.org
ee8c3176e5 Add include\ports to include path for SampleApp project on windows.
Review URL: http://codereview.appspot.com/4241049

git-svn-id: http://skia.googlecode.com/svn/trunk@887 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 19:03:26 +00:00
reed@google.com
9b74b1114a export SkCreateTypefaceFromLOGFONT
git-svn-id: http://skia.googlecode.com/svn/trunk@886 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 15:56:12 +00:00
reed@google.com
b0a984d5a6 delete unused file
git-svn-id: http://skia.googlecode.com/svn/trunk@885 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 14:05:03 +00:00
thakis@chromium.org
34f50edbd5 Delete another unused file.
git-svn-id: http://skia.googlecode.com/svn/trunk@884 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 07:47:04 +00:00
vandebo@chromium.org
094316bd28 [PDF] Restrict scalars to the range that PDF understands.
* Add a config flag to ignore the restrictions
* Apply restriction to both SkPDFScalar and scalars used in content streams.
* +/- 32,767 for the integer part.
* +/1 1/65536 for the fraction part.

Review URL: http://codereview.appspot.com/4240050

git-svn-id: http://skia.googlecode.com/svn/trunk@882 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 03:15:13 +00:00
reed@google.com
e280f1d164 bump SkStrAppendScalar_MaxSize to 15 to handle 3-digit exponents on some
platforms (like windows)



git-svn-id: http://skia.googlecode.com/svn/trunk@881 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-03 18:43:14 +00:00
vandebo@chromium.org
677cbedda7 Expose explicit functions to stringify float's and fixed's.
See http://codereview.appspot.com/4240050/

Review URL: http://codereview.appspot.com/4240068

git-svn-id: http://skia.googlecode.com/svn/trunk@880 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-03 18:20:12 +00:00
reed@google.com
759876a922 Our region blitter (invoked by region::setPath()) must have its scanlines
fed to it in scanline order (Y sorted, then X sorted).

If, however, we call rgn->setPath(path, otherRgn) with path in inverse mode,
then our scan converter code looks like this:

if (inverse)
    blit_top
scan_convert_path
if (inverse)
    blit_bottom

This is fine, unless otherRgn is complex. If it is, then blit_top will want to
efficiently "blit" otherRgn (the part above the path), and that means calling
blitRect in an iterator. That can result in chunks being passed to our blitter
(which is really accumulating scanlines) out of scanline order.

The change is to detect that otherRgn is complex, and if it is, just perform
the op in two steps:

1. setPath on a tmp region, limited by the bounds of otherRgn (simple)
2. intersect this tmp region with the currRgn.

This is effectively what we do for non-intersect ops. Intersect was different
only because we could (sometimes) avoid the step of create a tmp region.



git-svn-id: http://skia.googlecode.com/svn/trunk@879 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-03 14:32:51 +00:00
bsalomon@google.com
d302f1401b Add support for clipstack to Gr. GrClip is now a list of rects and paths with set operations to combine them. The stencil buffer is used to perform the set operations to put the clip into the stencil buffer. Building Gr's clip from Skia's clipStack is currently disabled due to the fact that Skia's clipStack is relative to the root layer not the current layer. This will be fixed in a subsequent CL.
git-svn-id: http://skia.googlecode.com/svn/trunk@878 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-03 13:54:13 +00:00
reed@google.com
1d12b1fd66 add setXYWH to rects
new tests for circles



git-svn-id: http://skia.googlecode.com/svn/trunk@877 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-03 13:23:35 +00:00
reed@google.com
55b6b58d8f Fix inverse scanconversion -- be sure to keep our calls to SkBlitter in scanline
order (top to bottom), since the region blitter explicitly requires this.



git-svn-id: http://skia.googlecode.com/svn/trunk@876 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-02 15:58:18 +00:00
bsalomon@google.com
7239aab311 Sample that exercises complex clipping variations.
git-svn-id: http://skia.googlecode.com/svn/trunk@875 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-02 15:35:28 +00:00
reed@google.com
d6f5a81955 #ifdef protect win specific code (e.g. LOGFONT)
git-svn-id: http://skia.googlecode.com/svn/trunk@874 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-02 14:34:11 +00:00
reed@google.com
22a0221968 check that alloc() succeeded before calling the scaler's getImage()
git-svn-id: http://skia.googlecode.com/svn/trunk@873 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-01 21:33:48 +00:00
reed@google.com
8072e4fdc8 bump SkStrAppendScalar_MaxSize to 14 to accomodate the largest string now that
scalar->string uses %.8g. Floats have at most 8 significant digits, plus we add
more space for sign, decimal point and exponent.

add tests to check these limits.



git-svn-id: http://skia.googlecode.com/svn/trunk@872 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-01 15:44:08 +00:00
reed@google.com
b652427197 remove obsolete generateLineHeight
use canonical lfHeight so we can compare different LOGFONTs and map
equivalent fonts (except for height) to the same typeface. To do this I
add fSize to scale the output from GDI to get from the canonical int textSize
to the actual fractional size.



git-svn-id: http://skia.googlecode.com/svn/trunk@871 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-01 15:18:14 +00:00
reed@google.com
f9bb7a8e20 fix float->int warning
git-svn-id: http://skia.googlecode.com/svn/trunk@870 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-01 15:15:13 +00:00
reed@google.com
ea282db262 fix warnings from windows
git-svn-id: http://skia.googlecode.com/svn/trunk@869 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-01 15:14:44 +00:00
ctguil@chromium.org
88183bc684 Add uniscribe library to windows release configuration.
Review URL: http://codereview.appspot.com/4253045

git-svn-id: http://skia.googlecode.com/svn/trunk@866 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-01 02:41:03 +00:00
reed@google.com
fa06e52803 use sprintf to generate float->string for SkString routines, removing the
worry of first converting the scalar to a fixed.



git-svn-id: http://skia.googlecode.com/svn/trunk@865 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-28 21:29:58 +00:00
reed@google.com
958c39bd05 export SkCreateTypefaceFromLOGFONT
git-svn-id: http://skia.googlecode.com/svn/trunk@864 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-28 21:08:23 +00:00
vandebo@chromium.org
0129410fbe [PDF] Fix broken encoding conversion code for non-multibyte fonts.
Review URL: http://codereview.appspot.com/4245044

git-svn-id: http://skia.googlecode.com/svn/trunk@863 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-28 19:52:18 +00:00
ctguil@chromium.org
58b28fb749 Remove SkRefCnt.cpp from windows build.
Review URL: http://codereview.appspot.com/4239043

git-svn-id: http://skia.googlecode.com/svn/trunk@862 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-25 22:21:15 +00:00
reed@google.com
77f0c8ba4e remove SkRefCnt.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@861 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-25 22:08:55 +00:00
bsalomon@google.com
de6ac2dec5 Fix double delete of vb pool and missing delete of ib pool
git-svn-id: http://skia.googlecode.com/svn/trunk@860 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-25 21:50:42 +00:00
reed@google.com
f4888c4b45 add simple test for SkBitmap::getColor()
git-svn-id: http://skia.googlecode.com/svn/trunk@859 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-25 19:50:19 +00:00
reed@google.com
a67573e25f http://codereview.appspot.com/4233041/
Add templated version of SkAutoTUnref.
Add unittests for it.
Remove unused helper apis on SkAutoUnref.



git-svn-id: http://skia.googlecode.com/svn/trunk@858 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-25 18:10:29 +00:00
reed@google.com
29f6636a5f Stop using deprecated APIs. Fix by twiz.
http://codereview.appspot.com/4249041/
BUG=http://code.google.com/p/skia/issues/detail?id=151



git-svn-id: http://skia.googlecode.com/svn/trunk@857 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-25 15:07:30 +00:00
vandebo@chromium.org
c2a9b7fe56 [PDF] Remove one copy of each content stream.
Review URL: http://codereview.appspot.com/4231044

git-svn-id: http://skia.googlecode.com/svn/trunk@856 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 23:22:30 +00:00
vandebo@chromium.org
f60a001d1a [PDF] Change the way flip origin is done.
The PDF shader matrix is dependent on flip origin or not, so we need to set it at device creation time.

Review URL: http://codereview.appspot.com/4216046

git-svn-id: http://skia.googlecode.com/svn/trunk@855 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 23:14:04 +00:00
vandebo@chromium.org
112706d4c5 Add SkBitmap::getColor(int x, int y) - return the color of a pixel in a bitmap.
Review URL: http://codereview.appspot.com/4230041

git-svn-id: http://skia.googlecode.com/svn/trunk@854 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 22:50:55 +00:00
vandebo@chromium.org
8ab3e0f07f [PDF] Bug fix - missing last odd column in 4444 bitmaps.
Review URL: http://codereview.appspot.com/4212044

git-svn-id: http://skia.googlecode.com/svn/trunk@853 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 21:51:13 +00:00
vandebo@chromium.org
d90c141feb [PDF] Clean up SkPDFStream and make it inherit from SkPDFDict.
A stream is a dictionary (with a couple particular entries) plus the data.
The common parent is useful for the shader implementation.

Review URL: http://codereview.appspot.com/4221045

git-svn-id: http://skia.googlecode.com/svn/trunk@852 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 21:50:04 +00:00
reed@google.com
a09368c971 fix bool bug so we can multisample now
git-svn-id: http://skia.googlecode.com/svn/trunk@851 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 21:42:29 +00:00
reed@google.com
93c5f9e787 Guard globalRef() virtual with #ifdef ANDROID, as these are not implemented
nor called by Skia proper.



git-svn-id: http://skia.googlecode.com/svn/trunk@850 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 18:09:46 +00:00
reed@google.com
875b4ecef7 add isFixedWidth() to expose the newly added attribute
git-svn-id: http://skia.googlecode.com/svn/trunk@849 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 18:03:12 +00:00
djsollen@google.com
7b34ea61ce Upstreaming code from android repository.
* fix for png decoder
* clean up for SkFontHost

reviewed by reed@google.com


git-svn-id: http://skia.googlecode.com/svn/trunk@847 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 16:28:51 +00:00
reed@google.com
02878b844c disable assert on validateClip in default build for now
git-svn-id: http://skia.googlecode.com/svn/trunk@846 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 13:04:42 +00:00
vandebo@chromium.org
d3ae77965e Add asAGradient shader extraction API.
Store initial gradient parameters.
Add compile asserts in GPU code for BitmapType ordering.

Review URL: http://codereview.appspot.com/4178063

git-svn-id: http://skia.googlecode.com/svn/trunk@845 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 00:21:06 +00:00
reed@google.com
7d7ca79c3e add fClipStack optional field to SkDraw (it is always set by canvas)
git-svn-id: http://skia.googlecode.com/svn/trunk@844 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-23 22:39:18 +00:00
reed@google.com
dca7acb2fe set the rgn to empty if the clipstack says empty (in our validate routine)
git-svn-id: http://skia.googlecode.com/svn/trunk@843 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-23 21:47:37 +00:00
reed@google.com
dc12bbdc41 add/update images for linux
git-svn-id: http://skia.googlecode.com/svn/trunk@842 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-23 20:53:12 +00:00
djsollen@google.com
57f4969724 merge from android tree:
- optional parameters added to descriptorProc and allocPixels
- clip options to image decoders
- check for xfermode in blitter_a8
- UNROLL loops in blitrow

reviewed by reed@google.com



git-svn-id: http://skia.googlecode.com/svn/trunk@841 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-23 20:46:31 +00:00
reed@google.com
819c921b04 refactor to use a shared function (clipPathHelper) between
SkCanvas::clipPath() and SkCanvas::validateClip().



git-svn-id: http://skia.googlecode.com/svn/trunk@840 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-23 18:56:55 +00:00
ctguil@chromium.org
7b19d6d12c Support unicode to glyph id conversion in windows for non-BMP characters.
BUG=144

Review URL: http://codereview.appspot.com/4172054

git-svn-id: http://skia.googlecode.com/svn/trunk@839 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-23 18:44:57 +00:00