Commit Graph

990 Commits

Author SHA1 Message Date
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
reed@google.com
62ab7addb0 export SkDraw::ComputeRectType() and share that with SkGpuDevice
git-svn-id: http://skia.googlecode.com/svn/trunk@1055 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-05 14:08:25 +00:00
reed@google.com
569e0435af add toggle keys:
'x' -- flip around X axis
'y' -- flip around Y axis
'b' -- toggle between normal, forced-on and forced-off antialiasing



git-svn-id: http://skia.googlecode.com/svn/trunk@1054 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-05 13:07:03 +00:00
reed@google.com
261c20a122 support BW text
git-svn-id: http://skia.googlecode.com/svn/trunk@1053 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-05 13:05:32 +00:00
reed@google.com
6115338c59 handle scale < 0 for stroke-rects
git-svn-id: http://skia.googlecode.com/svn/trunk@1052 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-05 13:05:18 +00:00
reed@google.com
0ebe81a2b7 always flush accumulated draws before we purge the font cache
git-svn-id: http://skia.googlecode.com/svn/trunk@1051 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 20:06:59 +00:00
vandebo@chromium.org
f71b2103d5 [PDF] Make the NOT_IMPLEMENTED macro not print anything by default.
Review URL: http://codereview.appspot.com/4351046

git-svn-id: http://skia.googlecode.com/svn/trunk@1050 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 19:46:31 +00:00
reed@google.com
761fb62b0e reenable fast stroked rects, now that we correctly handle non-square scale
also, degenerate non-antialias rectangles now draw properly



git-svn-id: http://skia.googlecode.com/svn/trunk@1049 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 18:58:05 +00:00
bsalomon@google.com
67dc548cec export GrDefaultPathRenderer/GrPathRenderer
Review URL: http://codereview.appspot.com/4357050/



git-svn-id: http://skia.googlecode.com/svn/trunk@1048 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 18:45:32 +00:00
reed@google.com
3380296080 temporarily disable fast stroking, until we handle non-square scales in matrix
git-svn-id: http://skia.googlecode.com/svn/trunk@1047 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 18:19:29 +00:00
reed@google.com
5e76223ca7 move trimStorage to outer scope, so its memory is still valid later on when
we reference the newly assigned src pixels.



git-svn-id: http://skia.googlecode.com/svn/trunk@1046 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 18:15:49 +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
reed@google.com
65c82f52be rebaseline antialiased stroked rects with faster code-path (and more accurate)
git-svn-id: http://skia.googlecode.com/svn/trunk@1044 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 14:49:38 +00:00
reed@google.com
5bff8d2030 add #ifdef SK_DISABLE_FAST_AA_STROKE_RECT to disable new 8x faster antialiased
stroked rects, since it draws slightly different (more correct) pixels, for
clients that want pixel compatibility.



git-svn-id: http://skia.googlecode.com/svn/trunk@1043 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 14:47:09 +00:00
mike@reedtribe.org
7ff678bc16 faster stroke rects
git-svn-id: http://skia.googlecode.com/svn/trunk@1042 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 14:38:12 +00:00
reed@google.com
f687087633 add baseline images for strokerects
git-svn-id: http://skia.googlecode.com/svn/trunk@1041 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 14:33:57 +00:00
reed@google.com
3b14dc1851 add strokerects to gm
output current bench settings



git-svn-id: http://skia.googlecode.com/svn/trunk@1040 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 14:31:36 +00:00
scroggo
42911fa885 Remove SkMetaData from makefile.
This makefile is used to build the sample app on
unix.  The file is not needed, and prevents the
build from working.



git-svn-id: http://skia.googlecode.com/svn/trunk@1039 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-04 13:02:19 +00:00
mike@reedtribe.org
2ecead5604 add 2 stroke tests to rects
git-svn-id: http://skia.googlecode.com/svn/trunk@1038 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-02 13:37:23 +00:00
reed@google.com
50dfa0130b add pixelref->readPixels()
unimplemented (for now) on the gpu side



git-svn-id: http://skia.googlecode.com/svn/trunk@1037 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-01 19:05:36 +00:00
bsalomon@google.com
5d561959dc Fix crash when codec not found for SampleDecode
git-svn-id: http://skia.googlecode.com/svn/trunk@1036 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-01 18:43:22 +00:00
vandebo@chromium.org
4b83c63573 Move where compression enable/disable is done to make recompilation faster.
Review URL: http://codereview.appspot.com/4354043

git-svn-id: http://skia.googlecode.com/svn/trunk@1035 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-01 18:33:22 +00:00
bsalomon@google.com
beccee78bb fix mac build of gr unit test
Review URL: http://codereview.appspot.com/4351042/



git-svn-id: http://skia.googlecode.com/svn/trunk@1034 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-01 14:51:07 +00:00
reed@google.com
f1ec465f87 add () to fix warning
git-svn-id: http://skia.googlecode.com/svn/trunk@1033 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-01 14:30:00 +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
reed@google.com
772813afa6 add code to test different premul techniques (disabled right now)
git-svn-id: http://skia.googlecode.com/svn/trunk@1030 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 22:34:45 +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
2022c94ec4 Fix signed/unsigned warnings in debug build in flushStencil()
git-svn-id: http://skia.googlecode.com/svn/trunk@1028 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 21:43:04 +00:00
bsalomon@google.com
b0259f3c86 Add GrResource.cpp to gr_files.mk
git-svn-id: http://skia.googlecode.com/svn/trunk@1027 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 21:31:12 +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
a7d948523d replace SkRefDict with SkMetaData (much more general)
git-svn-id: http://skia.googlecode.com/svn/trunk@1025 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 21:23:07 +00:00
ctguil@chromium.org
0e6dc0a320 Prepend SkAdvancedTypefaceMetrics on enum usage.
Review URL: http://codereview.appspot.com/4321047

git-svn-id: http://skia.googlecode.com/svn/trunk@1024 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 20:41:16 +00:00
ctguil@chromium.org
dfc5ffe478 Additional SK_API annotations needed for print preview on windows.
Review URL: http://codereview.appspot.com/4324042

git-svn-id: http://skia.googlecode.com/svn/trunk@1022 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 20:14:49 +00:00
reed@google.com
438aadd4a1 add SkMetaData
git-svn-id: http://skia.googlecode.com/svn/trunk@1021 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 18:41:41 +00:00
vandebo@chromium.org
325cb9aa17 Improve the SkAdvancedTypefaceMetrics interface w.r.t. vertical advances.
Add a template function to type safe-combine bits of a bit field.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@1020 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 18:36:29 +00:00
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