Commit Graph

1283 Commits

Author SHA1 Message Date
senorblanco@chromium.org
64cc579efa The plain Makefile was using -Wall, but the gyp build wasn't. This CL turns on
-Wall -Wextra and -Wno-unused in common.gypi.  This revealed a lot of warnings
(and some actual bugs), all of which I fixed here.  This is pretty mindless
stuff for the most part (order of intialization, missing initializers, && within
||, etc), but will allow us to build cleanly with -Wall and -Wextra (and
-Werror, if we so choose).

I put defaults into switches that were missing cases.  I could put in the actual
missing enums instead if that's desired.  I could also assert on missing enums
instead of break, if that's desired.  I wasn't sure how to test the stuff in
"animator", so that should be looked at a bit more closely.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1386 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-19 19:58:58 +00:00
bungeman@google.com
9e0f2ee033 Add build for unix to gyp.
git-svn-id: http://skia.googlecode.com/svn/trunk@1385 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-19 19:02:20 +00:00
bungeman@google.com
71ff02c8ef Add unix and mesa GL files to gyp.
http://codereview.appspot.com/4545055/


git-svn-id: http://skia.googlecode.com/svn/trunk@1383 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-19 18:04:48 +00:00
bsalomon@google.com
c386b8752b Fix windows build (missing SkFontHost.cpp)
git-svn-id: http://skia.googlecode.com/svn/trunk@1377 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-19 14:39:57 +00:00
junov@google.com
d31cbc4650 Removing remnants of GrGLEffect.
Bug: http://code.google.com/p/skia/issues/detail?id=264
Code review: http://codereview.appspot.com/4517073/



git-svn-id: http://skia.googlecode.com/svn/trunk@1350 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-17 17:01:17 +00:00
junov@google.com
8af476a7dc Fixed typo in skia.gyp
-This line, and those below, will be ignored--

M    gyp/skia.gyp


git-svn-id: http://skia.googlecode.com/svn/trunk@1349 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-17 16:00:46 +00:00
junov@google.com
869d6d9f4d Adding a test to sampleapp for texture domain
git-svn-id: http://skia.googlecode.com/svn/trunk@1347 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-17 15:47:10 +00:00
reed@google.com
852fa0fafa remove dead files
git-svn-id: http://skia.googlecode.com/svn/trunk@1338 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-16 19:15:16 +00:00
junov@google.com
6acc9b3d2b Fixed color bleeding issue when drawing a sub region of a bitmap with filtering enabled.
Problem was resolved by adding the notion of a custom texture domain in generated shaders, when necessary.




git-svn-id: http://skia.googlecode.com/svn/trunk@1337 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-16 18:32:07 +00:00
senorblanco@chromium.org
92e0f222fb Edge antialiasing for convex shapes in Ganesh
This patch implements edge antialiasing for convex shapes, using the fragment
shader to compare against the edge equations for each triangle.  Currently, it
only works for flat shaded primitives (i.e., it was not integrated into the
"active stages" path).  The skia.gyp changes cause this code to be compiled into
SampleApp, but do not enable the tesselated path by default.

Notes:  the SkOSWindow_Unix.cpp change is to silence a valgrind warning about
memcpy() with overlapping regions.  The GrBinHashKey change is to avoid running
a two-pass hash (GrProgramDesc is now 52 bytes or so, exceeding the 32 byte
default size).

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1314 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-12 15:49:15 +00:00
Scroggo
97c88c255c Add color filters to gpu path.
git-svn-id: http://skia.googlecode.com/svn/trunk@1297 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 14:05:25 +00:00
bsalomon@google.com
fc29629525 Replace GrStringBuilder with SkString. First step in cleaning up the shader generator. Slight performance hit when creating a new shader (<10% of total shader gen time on my Windows box is spent in building our string before handing it to GL). Much of this can be recovered by better usage pattern of SkString in coming revisions.
Review URL: http://codereview.appspot.com/4465053/ 



git-svn-id: http://skia.googlecode.com/svn/trunk@1266 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-06 13:53:47 +00:00
bsalomon@google.com
f871268f56 Remove GrPrintf_printf from gyp (should be using GrPrintf_skia that is already included in the skgr lib to direct GrPrintf to SkDebugf).
git-svn-id: http://skia.googlecode.com/svn/trunk@1248 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-04 20:18:04 +00:00
senorblanco@chromium.org
c1587e0f45 Fix SampleApp raster path on Linux to use SK_SAMPLES_FOR_X, so pixel components
are in the right order (RGBA vs BGRA).

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1246 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-04 18:59:38 +00:00
bsalomon@google.com
2b3579958d update gyp file to build new files
git-svn-id: http://skia.googlecode.com/svn/trunk@1225 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-02 20:46:48 +00:00
bsalomon@google.com
0533971c5f Make gyp file define GR/SK debug/release flags. Remove file that breaks release build.
git-svn-id: http://skia.googlecode.com/svn/trunk@1211 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-28 21:04:06 +00:00
bsalomon@google.com
205d46067a Move alpha-ramp AA to GrContext, detect cases when AA is applied via other methods (smooth lines, MSAA) or rect falls on integer coords and skip the alpha ramp path. Use pre-fab index buffer for alpha-ramped fill rects and stroke rects.
Review URL: http://codereview.appspot.com/4449047/

git-svn-id: http://skia.googlecode.com/svn/trunk@1169 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-25 12:43:45 +00:00
bsalomon@google.com
1217afe9a7 Add SkClampRange files to gyp
git-svn-id: http://skia.googlecode.com/svn/trunk@1150 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-19 13:44:20 +00:00
Scroggo
9df214e836 http://codereview.appspot.com/4373057/
git-svn-id: http://skia.googlecode.com/svn/trunk@1135 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-15 14:48:08 +00:00
senorblanco@chromium.org
afac88855a This patch provides the include file common.gypi (cargo culted from another
project) which implements basic support for Debug and Release targets in the
gyp-generated project files.  All configurations build on all platforms with
the exception of Windows/Release, which seems to have compile errors not
resolved here.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1101 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-11 15:59:47 +00:00
bsalomon@google.com
669fdc4ed8 Adds read pixels to GrTexture and GrRenderTarget
Adds SkGrRenderTargetPixelRef for SkBitmaps that are backed by RTs that aren't textures.
Adds onReadPixels implementations for SkGr pixel ref types



git-svn-id: http://skia.googlecode.com/svn/trunk@1056 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-05 17:08:27 +00:00
bsalomon@google.com
f987d1b234 Remove dependence on platform GL headers. Remove code that attempts to infer GL function pointers on various platforms. Instead add platform-specific implementations for Windows and Mac. (GLX coming)
Review URL: http://codereview.appspot.com/4354048/

git-svn-id: http://skia.googlecode.com/svn/trunk@1045 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 17:13:52 +00:00
ctguil@chromium.org
1493a66824 Add src/core include for pdf project.
Review URL: http://codereview.appspot.com/4331053

git-svn-id: http://skia.googlecode.com/svn/trunk@1032 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-31 23:17:05 +00:00
junov@google.com
f93e717c7f Refactoring the GrGpuGLShaders2 into 2 classes: GrGpuGLShaders
and GrGLProgram.  The change also contains stubs and placeholders for GrEffect
(work in progress), which will extend shader and rendering capabilities in
Ganesh.  The hash keys for the program cache table have been modified to be able
to accomodate variable-length keys, which will be required for GrEffect support.

Code review: http://codereview.appspot.com/4309045/



git-svn-id: http://skia.googlecode.com/svn/trunk@1031 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-31 21:26:24 +00:00
bsalomon@google.com
30ca0a69e6 Add pdf to skia.gyp and checkin a snap of GYP.
Review URL: http://codereview.appspot.com/4307050/



git-svn-id: http://skia.googlecode.com/svn/trunk@1029 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 22:04:53 +00:00
bsalomon@google.com
8fe72477f2 Add GrResource base class for ibs, texs, vbs, etc.
Add lostContext() to GrContext.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@1026 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 21:26:44 +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
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
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
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
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
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
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