bsalomon@google.com
649a862186
Remove "true ||" in conditional that was accidentally checked in.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@916 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-10 14:53:38 +00:00
bsalomon@google.com
1da0746fa1
Delete GL tex ID when last of GrGLTexture or GrGLRenderTarget that reference it is destroyed
...
git-svn-id: http://skia.googlecode.com/svn/trunk@915 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-10 14:51:57 +00:00
bsalomon@google.com
a7f84e150c
Make flush discardable and lazily reset context
...
Review URL: http://codereview.appspot.com/4259059/
git-svn-id: http://skia.googlecode.com/svn/trunk@914 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-10 14:13:19 +00:00
reed@google.com
63a6060fcd
add realloc() to SkAutoSMalloc, plus some documentation
...
git-svn-id: http://skia.googlecode.com/svn/trunk@913 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-10 13:07:35 +00:00
twiz@google.com
316338a4eb
Correction of the non-portable use of dynamically allocated stack arrays in the
...
pdf shader code.
I briefly looked into making use of alloca, but that is also non-portable, and
deprecated in many environments. Fell back to the SkTDArray class as a common
denominator.
This problem was introduce by the following CL:
http://codereview.appspot.com/4239061/
git-svn-id: http://skia.googlecode.com/svn/trunk@912 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-09 23:14:04 +00:00
reed@google.com
ee467ee79d
Correct blitmask procs to recognize that we pass them an SkColor, and if they
...
want a SkPMColor, they need to call SkPreMultiplyColor()
Add Opaque and Black optimizations for blitmask_d32
git-svn-id: http://skia.googlecode.com/svn/trunk@911 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-09 13:23:57 +00:00
reed@google.com
981d479800
http://codereview.appspot.com/3980041/
...
Add blitmask procs (with optional platform acceleration)
patch by yaojie.yan
git-svn-id: http://skia.googlecode.com/svn/trunk@910 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-09 12:55:47 +00:00
bsalomon@google.com
0b50b2ed46
If we compute an exact clip bounds prefer it over user passed bounds. Also clarify that bounds are conservative.
...
Review URL: http://codereview.appspot.com/4254063/
git-svn-id: http://skia.googlecode.com/svn/trunk@909 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 21:07:21 +00:00
bsalomon@google.com
eb3828e29d
Remove deleted GrApi.h from gpu xcode project
...
git-svn-id: http://skia.googlecode.com/svn/trunk@908 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 20:21:18 +00:00
bsalomon@google.com
c919200c5a
Add new pdf files to SampleApp xcode proj
...
git-svn-id: http://skia.googlecode.com/svn/trunk@907 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 20:19:54 +00:00
vandebo@chromium.org
5b073680ec
Enable compiling the PDF backend by default in the makefile.
...
Use SKIA_PDF_SUPPORT=false to disable the PDF backend.
Review URL: http://codereview.appspot.com/4267046
git-svn-id: http://skia.googlecode.com/svn/trunk@906 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 18:33:31 +00:00
vandebo@chromium.org
da912d61ed
[PDF] Add support for Shaders.
...
- Shaders, or as they are referred to in PDF, patterns, are drawn in the coordinate system of the initial page, so when we canonicalize them, we have to consider the current transform and where they are constructed.
- Image shaders are tiled by default, this makes repeat and mirror modes easy, but means we have to draw a pattern as large as the current clip to support clamp mode.
- Gradient shaders are implemented with type 4 functions, which are basically small snippets of post script code. I've tried to make the code generation modular and heavily commented to make it easy to understand or expand.
Review URL: http://codereview.appspot.com/4239061
git-svn-id: http://skia.googlecode.com/svn/trunk@905 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 18:31:02 +00:00
bsalomon@google.com
e8c701cbf5
Add filters to organize the VS project. Remove unused Gr files.
...
Review URL http://codereview.appspot.com/4243064/
git-svn-id: http://skia.googlecode.com/svn/trunk@904 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 18:19:05 +00:00
reed@google.com
ddbf4c85de
remove unused methods from SkRefPtr, as a check-point for better understanding
...
what we want to do with this class.
git-svn-id: http://skia.googlecode.com/svn/trunk@903 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 16:06:06 +00:00
reed@google.com
480ab7d5f1
add LF at end of file (dumb warning)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@902 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 15:36:57 +00:00
reed@google.com
27a1e77858
add LF at end of file (ancient warning appeased)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@901 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 15:34:06 +00:00
reed@google.com
8cad58624b
add const to SkColorShader's asABitmap
...
git-svn-id: http://skia.googlecode.com/svn/trunk@900 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 14:51:44 +00:00
reed@google.com
a6d59f60aa
fix warnings in VS 2010
...
drawPaint() doesn't need +1 to fill its bounds
git-svn-id: http://skia.googlecode.com/svn/trunk@899 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-07 21:29:21 +00:00
reed@google.com
7c2f27d788
make asABitmap() const
...
change private cache fields in gradient to be mutable
git-svn-id: http://skia.googlecode.com/svn/trunk@898 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-07 19:29:00 +00:00
bsalomon@google.com
ed856100c8
Fix warning about uninit var subpathClosed
...
git-svn-id: http://skia.googlecode.com/svn/trunk@897 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-07 14:07:01 +00:00
vandebo@chromium.org
6bcf995a26
[PDF] Re add line accidentally removed in r892.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@896 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-05 00:24:50 +00:00
bsalomon@google.com
bf4338cb3b
Fix Sample App on Win32 GL window resize, fix sk->gr convexity hint, fix grpath uninit warnings
...
Review URL http://codereview.appspot.com/4247055/
git-svn-id: http://skia.googlecode.com/svn/trunk@895 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 22:48:25 +00:00
reed@google.com
6f8f292aa7
add origin to device
...
used for interpreting the clipstack when a device is a layer
git-svn-id: http://skia.googlecode.com/svn/trunk@894 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 22:27:10 +00:00
ctguil@chromium.org
f966fd35cf
Add SkPDFUtils.cpp to build.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@893 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 21:47:04 +00:00
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