Commit Graph

954 Commits

Author SHA1 Message Date
reed@google.com
e733071abe add refcnt helper to metadata
add unittests for metadata



git-svn-id: http://skia.googlecode.com/svn/trunk@1019 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 18:23:21 +00:00
reed@google.com
5e3496e555 move SkMetaData into core
git-svn-id: http://skia.googlecode.com/svn/trunk@1018 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 17:10:42 +00:00
reed@google.com
a45af9f585 add new file GrPathUtils.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@1017 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 17:06:19 +00:00
reed@google.com
9266fed56a add getTopLayer(), so clients don't have to use a LayerIter just to get
the top. (very common for chrome)



git-svn-id: http://skia.googlecode.com/svn/trunk@1016 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 00:18:03 +00:00
bsalomon@google.com
11f0b51976 Fix ref leak on GrGpu.
Review URL: http://codereview.appspot.com/4323043/



git-svn-id: http://skia.googlecode.com/svn/trunk@1015 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-29 20:52:23 +00:00
senorblanco@chromium.org
cf3edc9c97 Two optimizations for the tesselated path renderer:
1)  If the path contains a single convex subpath, and we're not using inverted
fill modes, skip the tesselation and draw the interpolated path as a triangle
fan directly.
2)  Use GrDrawTarget.set*SourceToArray(), rather than creating a new
AutoReleaseGeometry, saving a copy of the vertex and index data.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1014 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-29 17:42:30 +00:00
senorblanco@chromium.org
9d18b7873c This CL implements a tesselated path renderer, using GLU's libtess. All of the
fill modes except hairline are supported.  Note that the path renderer is not
enabled by default; to enable it, replace "GrCreatePathRenderer_none.cpp" with
"GrCreatePathRenderer_tesselated.cpp" in skia.gyp, and run gyp_skia, and build.

This change also contains a number of build fixes for Win32 (for building
SampleApp on VS2008) and Mac (for my ancient Mac Pro which supports
GL_EXT_framebuffer_object but not GL_ARB_framebuffer_object).  Also,
priorityq-heap.c was removed from the SampleApp build, since it's #included by
priorityq.c (weird, I know).

NB:  When this change is rolled into chrome, some modifications to chromium's
skia.gyp will be necessary.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1012 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-28 20:47:09 +00:00
vandebo@chromium.org
cae5fba82e Store content streams in an SkStream instead of an SkString (64k size limit).
Review URL: http://codereview.appspot.com/4272070

git-svn-id: http://skia.googlecode.com/svn/trunk@1011 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-28 19:03:50 +00:00
reed@google.com
94f6a730bb add experimental Relay class
git-svn-id: http://skia.googlecode.com/svn/trunk@1010 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-28 03:47:18 +00:00
bsalomon@google.com
04de782d7c Hairline stroke 1px wide paths.
Review URL: http://codereview.appspot.com/4317041/



git-svn-id: http://skia.googlecode.com/svn/trunk@1008 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-25 18:04:43 +00:00
senorblanco@chromium.org
7eb492e839 Add the GLU tesselator source files to third_party. Add a libtess static
library build target to the .gyp file (not required by any executable yet).  Fix
some build errors with SampleApp on Linux and Win32.  Add a gyp_skia python
script which invokes gyp with the correct arguments, and is recursively callable
by the Makefile when skia.gyp is changed.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1007 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-25 17:41:34 +00:00
reed@google.com
7ff8d81290 add dox for drawPath, describing how to interpret the prePathMatrix.
git-svn-id: http://skia.googlecode.com/svn/trunk@1006 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-25 15:08:16 +00:00
bsalomon@google.com
dfe75bcf98 Add way to determine at link time what path renderer will be used.
Added mechanism for a custom path renderer to punt and fallback to default path renderer



git-svn-id: http://skia.googlecode.com/svn/trunk@1005 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-25 12:31:16 +00:00
reed@google.com
b123c9d997 Remove optional impl for SkClampMax that relied on not wrapping, as in fact
we do sometimes (e.g. gradients).



git-svn-id: http://skia.googlecode.com/svn/trunk@1003 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-24 19:17:31 +00:00
Scroggo
0f185c2709 Move zoomer into SampleApp
git-svn-id: http://skia.googlecode.com/svn/trunk@1002 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-24 18:35:50 +00:00
bsalomon@google.com
7f5875d334 Fix direct-to-stencil clippath rendering logic in GrGpu.
Review URL: http://codereview.appspot.com/4273104/

git-svn-id: http://skia.googlecode.com/svn/trunk@1001 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-24 16:55:45 +00:00
bsalomon@google.com
f6a7c1106e Rename flag that disables stencil buffer creation
Review URL: http://codereview.appspot.com/4273103/



git-svn-id: http://skia.googlecode.com/svn/trunk@1000 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-24 16:14:10 +00:00
scroggo
7b11807968 Fix a crash.
http://codereview.appspot.com/4272065/


git-svn-id: http://skia.googlecode.com/svn/trunk@986 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-23 15:04:26 +00:00
reed@google.com
0a0a236c3b Initialize fClip in SkBounder, in case doIRect() is called before it is used
inside a canvas (which calls setClip).

Export a global empty region. Used by SkBounder's constructor.



git-svn-id: http://skia.googlecode.com/svn/trunk@985 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-23 13:51:55 +00:00
bsalomon@google.com
a9ecdadfbc Add GL_CHROMIUM_framebuffer_multisample support.
Review URL: http://codereview.appspot.com/4287072/



git-svn-id: http://skia.googlecode.com/svn/trunk@984 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-23 13:50:34 +00:00
bsalomon@google.com
c04e6d500c Fix SK build macro.
Review URL: http://codereview.appspot.com/4312041/



git-svn-id: http://skia.googlecode.com/svn/trunk@983 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 20:53:31 +00:00
reed@google.com
6fa4518620 inline knowledge that our pointsize is always 1 when we measure/draw
#ifdef protect 10.6 or later APIs (not available on 10.5)



git-svn-id: http://skia.googlecode.com/svn/trunk@982 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 19:49:08 +00:00
reed@google.com
a03ec86e99 add GR at the end
git-svn-id: http://skia.googlecode.com/svn/trunk@981 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 17:49:13 +00:00
bsalomon@google.com
8361a0fa2c Fix macro in Chrome's GL config file
Review URL: http://codereview.appspot.com/4308041/


git-svn-id: http://skia.googlecode.com/svn/trunk@980 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 14:38:11 +00:00
reed@google.com
df49991eb3 add SkCreateTypefaceFromCTFont() to create a typeface directly from a CTFontRef
Compute the actual style from the returned CTFontRef, rather than assuming the
request will always be met.



git-svn-id: http://skia.googlecode.com/svn/trunk@979 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 14:07:59 +00:00
scroggo
08526c07f4 Add a 'fatbits' mode to unix sample app.
git-svn-id: http://skia.googlecode.com/svn/trunk@978 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 14:03:21 +00:00
bsalomon@google.com
86c92b3d8f Remove redundant defines of GR_GL macros.
Patch submitted by weiwei.li@intel.com

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



git-svn-id: http://skia.googlecode.com/svn/trunk@977 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 13:08:48 +00:00
mike@reedtribe.org
9db4928b26 add more styles to show
git-svn-id: http://skia.googlecode.com/svn/trunk@976 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 01:35:30 +00:00
mike@reedtribe.org
2ccdf2abc2 map canonical css names to real fonts
git-svn-id: http://skia.googlecode.com/svn/trunk@975 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 01:32:34 +00:00
bsalomon@google.com
d1e4335318 Remove IMG multisample texture support.
This never worked correctly. The texture loses multisample status when the resolve occurs. We never had code to re-establish it. Also, we'd have to handle the case where you resolve but then want to render to it again without clearing.

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


git-svn-id: http://skia.googlecode.com/svn/trunk@974 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 21:38:40 +00:00
reed@google.com
ce11b26e82 convert fixed->scalar directly, since we know that the
glyph's advance is already base-1000



git-svn-id: http://skia.googlecode.com/svn/trunk@973 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 21:25:35 +00:00
bsalomon@google.com
c312bf9935 Remove old GR_* macros for GL extensions in favor of GrGLDefines.h
Review URL: http://codereview.appspot.com/4275061/




git-svn-id: http://skia.googlecode.com/svn/trunk@972 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 21:10:33 +00:00
reed@google.com
160f2c0e17 increase intermediate precision when chopping lines. This avoids returning a
computed value that is accidentally outside of the original range.



git-svn-id: http://skia.googlecode.com/svn/trunk@971 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 20:33:42 +00:00
bsalomon@google.com
918261018f Add GR_DLL builds to Ganesh (minimal exports for Chrome multi-dll for now).
Review URL:  http://codereview.appspot.com/4301044/




git-svn-id: http://skia.googlecode.com/svn/trunk@970 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 19:51:57 +00:00
reed@google.com
e6507632c1 change -lpng12 to -lpng
The distinction doesn't seem necessary, and newer installs are getting 1.4 or later of libpng



git-svn-id: http://skia.googlecode.com/svn/trunk@969 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 17:45:15 +00:00
bsalomon@google.com
a9681db3f5 Fix line endings on gyp file.
Review URL:  http://codereview.appspot.com/4281063/



git-svn-id: http://skia.googlecode.com/svn/trunk@968 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 13:34:23 +00:00
mike@reedtribe.org
dd0cd34067 allow window-subclass to handle dispatching click events (for resize)
add drag tracking to Draw



git-svn-id: http://skia.googlecode.com/svn/trunk@967 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 00:53:39 +00:00
mike@reedtribe.org
b7d956df46 add draw sample
git-svn-id: http://skia.googlecode.com/svn/trunk@966 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-20 20:19:16 +00:00
vandebo@chromium.org
57463e1908 Make SkDeviceFactory part of the API.
Review URL: http://codereview.appspot.com/4273081

git-svn-id: http://skia.googlecode.com/svn/trunk@965 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-19 17:27:49 +00:00
scroggo
001b972189 Pass motion events in the unix sample app.
Allows dragging and flinging the samples.


git-svn-id: http://skia.googlecode.com/svn/trunk@964 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 22:09:01 +00:00
scroggo
b66365f5dd Updates to the unix sample app.
Rather than placing pixels, use XPutImage to place the bitmap on screen.

Modify the color arrangements for 8888 when building the sample app, so
they agree with X.

Add a title to simple sample.

Include SkTouchGesture.



git-svn-id: http://skia.googlecode.com/svn/trunk@963 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 21:43:03 +00:00
reed@google.com
3f0dcf96c3 fix scalar math to work with float and fixed
git-svn-id: http://skia.googlecode.com/svn/trunk@962 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 21:23:45 +00:00
reed@google.com
c31a9d6d39 fix warnings of int->float and double->float
git-svn-id: http://skia.googlecode.com/svn/trunk@961 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 20:53:44 +00:00
twiz@google.com
b65e0cb8ad Remove the compile-time selection of the GL implementation based on the
GR_SUPPORT_GLDESKTOP family of macros.  

Support for the platform is configured dynamically, by querying the
fBindingsExported member of active GrGLInterface instance.

Review: http://codereview.appspot.com/4298048/ 



git-svn-id: http://skia.googlecode.com/svn/trunk@960 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 20:41:44 +00:00
twiz@google.com
0f31ca79bd This CL removes all dependencies on GL headers across all of Ganesh. New
GrGLint, etc. types are introduced, and new GR_GL_XXXX constants for use at all
GL call-sites.

Review:  http://codereview.appspot.com/4272061/



git-svn-id: http://skia.googlecode.com/svn/trunk@959 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 17:38:11 +00:00
bsalomon@google.com
098611bd74 Revert GR_STATIC_RECT_VB in GrGLConfig_chrome.h
Review URL: http://codereview.appspot.com/4282057/


git-svn-id: http://skia.googlecode.com/svn/trunk@958 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 15:10:06 +00:00
reed@google.com
4b0f0b2758 fix warnings (local storage too small, int->scalar)
git-svn-id: http://skia.googlecode.com/svn/trunk@957 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 14:47:36 +00:00
reed@google.com
97fa34c5f0 change operator== to return bool instead of int
update dox formating



git-svn-id: http://skia.googlecode.com/svn/trunk@956 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 14:44:42 +00:00
bsalomon@google.com
c8ad63e5e4 Initial GYP file for skia / gr. Builds SampleApp on Mac, Windows, Linux.
Review URL: http://codereview.appspot.com/4282056/

git-svn-id: http://skia.googlecode.com/svn/trunk@955 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 14:29:44 +00:00
mike@reedtribe.org
2f834592b1 use SkSafeUnref()
git-svn-id: http://skia.googlecode.com/svn/trunk@954 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 10:33:47 +00:00