Commit Graph

565 Commits

Author SHA1 Message Date
senorblanco@chromium.org
3cb406bb88 Implement support for origin-TopLeft render targets. Note that the default behaviour remains the same: textures default to origin-TopLeft, render targets default to origin-BottomLeft, and backend textures default to origin-BottomLeft. However, the caller can override the default by setting fOrigin in GrTextureDesc, GrBackendTextureDesc or GrBackendRenderTargetDesc.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7594 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 19:50:46 +00:00
robertphillips@google.com
cf9faf6ce9 Reverting r7545 (render target origin change) due to layout test issues (see https://codereview.chromium.org/12210002/)
git-svn-id: http://skia.googlecode.com/svn/trunk@7571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 14:05:06 +00:00
senorblanco@chromium.org
ed8659b51d Implement support for origin-TopLeft render targets in GL backend.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7545 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 17:29:51 +00:00
bsalomon@google.com
67b915de99 Make GPU unit tests use GrContexts of different GL types.
Review URL: https://codereview.appspot.com/7281046

git-svn-id: http://skia.googlecode.com/svn/trunk@7540 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 16:13:32 +00:00
skia.committer@gmail.com
cdcb2ce274 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7439 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-29 07:05:52 +00:00
senorblanco@chromium.org
22943cd588 Fix debug build. Unreviewed.
git-svn-id: http://skia.googlecode.com/svn/trunk@7416 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 16:48:51 +00:00
senorblanco@chromium.org
ef5dbe1cd9 Add an origin flag for backend (external) textures. Some textures in WebKit have a topdown orientation, and skia needs to be notified of this, so that they are not drawn upside-down.
Review URL: https://codereview.appspot.com/7200048

git-svn-id: http://skia.googlecode.com/svn/trunk@7414 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 16:42:38 +00:00
bsalomon@google.com
adc6536fe5 Remove getter of writable GrEffectStage from GrDrawState.
Upcoming changes will require GrDrawState to know things about the set of installed effects. Thus all setting of effects must go through a GrDrawState function (setEffect()). This change accomplishes that.
Review URL: https://codereview.appspot.com/7214045

git-svn-id: http://skia.googlecode.com/svn/trunk@7411 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 14:26:09 +00:00
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
bsalomon@google.com
95ed55adc6 Make all GrContext members that return a texture also ref the texture for the caller.
Review URL: https://codereview.appspot.com/7198049

git-svn-id: http://skia.googlecode.com/svn/trunk@7362 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-24 14:46:47 +00:00
bsalomon@google.com
838f6e18fb Add deferred count to GrResource.
This will be used to determine whether a resource can either be deleted or reinserted in the cache when its ref count reaches zero.
Review URL: https://codereview.appspot.com/7202046

git-svn-id: http://skia.googlecode.com/svn/trunk@7355 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 21:37:01 +00:00
bsalomon@google.com
1f0f1a3b5e Fix bug introduced in r7348, deleting wrapped resources.
git-svn-id: http://skia.googlecode.com/svn/trunk@7354 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 21:32:32 +00:00
bsalomon@google.com
7283022819 Make GrResource know whether 3D objects' lifetimes are managed by Skia or not.
Review URL: https://codereview.appspot.com/7201046

git-svn-id: http://skia.googlecode.com/svn/trunk@7348 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 20:25:22 +00:00
bsalomon@google.com
ca43208e4a Reland r7342 with fixes.
git-svn-id: http://skia.googlecode.com/svn/trunk@7346 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 19:53:46 +00:00
bsalomon@google.com
58f9ae1c7a Revert 7342 to investigate failures.
git-svn-id: http://skia.googlecode.com/svn/trunk@7345 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 19:09:06 +00:00
bsalomon@google.com
bcede394ee Add GrDrawState::DeferredState for saving GrDrawStates in GrInOrderDrawBuffer.
A future CL will do the unref'ing of GrResources when converting a GrDrawState to a DeferredState.
Review URL: https://codereview.appspot.com/7181049

git-svn-id: http://skia.googlecode.com/svn/trunk@7342 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 18:29:21 +00:00
bsalomon@google.com
730138c02b Remove declaration of unimplemented function.
git-svn-id: http://skia.googlecode.com/svn/trunk@7327 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 22:04:13 +00:00
bsalomon@google.com
8a252f7962 Switch GrEffect::onIsEqual signature back to GrEffect from GrEffectRef.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7188046

git-svn-id: http://skia.googlecode.com/svn/trunk@7326 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 20:35:13 +00:00
bsalomon@google.com
6340a41108 Let them eat GrEffectRef.
Changes the remaining existing code that operates on naked GrEffects to GrEffectRef.
Review URL: https://codereview.appspot.com/7124058

git-svn-id: http://skia.googlecode.com/svn/trunk@7321 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 19:55:59 +00:00
jvanverth@google.com
46d3d39e65 Add GPU support for axis-aligned ovals:
- Add drawOval base function to SkDevice, and override in SkGpuDevice
- Move isSimilarityMatrix to SkMatrix (renamed to isSimilarity) and fixed up unit test
- Since both SkGpuDevice::drawOval() and GrContext::drawPath() can try to draw ovals, added GrContext::canDrawOval() and GrContext::internalDrawOval() to avoid duplicate code
- Hooked in axis-aligned oval fill shader
- Enabled GPU stroked circles
- Added stroked circle bench test

Review URL: https://codereview.appspot.com/7137050



git-svn-id: http://skia.googlecode.com/svn/trunk@7304 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 13:34:01 +00:00
bsalomon@google.com
68b58c9538 Remove default implementation of GrEffect::isEqual. Make GrSingleTextureEffect abstract.
Review URL: https://codereview.appspot.com/7142049

git-svn-id: http://skia.googlecode.com/svn/trunk@7254 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-17 16:50:08 +00:00
bsalomon@google.com
a1ebbe447d Change some function/vars from EffectPtr to EffectRef to reflect GrEffectPtr->GrEffectRef renaming.
git-svn-id: http://skia.googlecode.com/svn/trunk@7226 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 15:51:47 +00:00
bsalomon@google.com
87c472653b Fix no-static-init (android) build.
git-svn-id: http://skia.googlecode.com/svn/trunk@7225 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 15:38:37 +00:00
bsalomon@google.com
64287c5ef7 Fix missing "class" in friend decls in GrEffect.h
git-svn-id: http://skia.googlecode.com/svn/trunk@7223 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 15:25:55 +00:00
bsalomon@google.com
0ac6af4997 Wrap GrEffects in GrEffectPtr.
This is the first step towards automatic recycling of scratch resouces in the cache via ref-cnts.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7092061

git-svn-id: http://skia.googlecode.com/svn/trunk@7222 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 15:16:18 +00:00
bsalomon@google.com
371e105da5 Add GrEffect::updateKnownColorComponents(). It is used to determine whether the output of an effect has a constant output value for r,g,b, or a.
Review URL: https://codereview.appspot.com/7064057

git-svn-id: http://skia.googlecode.com/svn/trunk@7144 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-11 21:08:55 +00:00
bsalomon@google.com
50db75c871 Make GrEffect::textureAccess non-virtual. Require subclasses to append their GrTAs.
Review URL: https://codereview.appspot.com/7062063

git-svn-id: http://skia.googlecode.com/svn/trunk@7129 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-11 13:54:30 +00:00
sugoi@google.com
e3453cbd20 This CL introduces a new path renderer.
Here are the characteristics :
- It uses the original path, before stroking
- It supports traight lines only (no curves)
- It supports butt or square caps only
- It supports miter or bevel joins only
- No AA support
Support for these will be added step by step later on.

A first pass at the benchmarks on my linux machine gave me these approximate speed improvements (running all bench with the option '--forceAA 0') :
path_stroke_small_long_line 4X
path_stroke_small_sawtooth 4X
path_stroke_big_rect 4X
path_stroke_small_rect 6X
path_stroke_big_triangle 4X
path_stroke_small_triangle 10X
lines_1_BW 1.5X
dashline_2_square 1.5X
dashline_1_square 1.5X

Also note that I can't submit this code until GrDrawTarget::isOpaque() is implemented, unless I just disable my renderer completely for now.

BUG=chromium:135111
TEST=The following gms are affected and may require rebaselining : lineclosepath, linepath, strokes_poly
Review URL: https://codereview.appspot.com/7026049

git-svn-id: http://skia.googlecode.com/svn/trunk@7047 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-07 14:26:40 +00:00
bsalomon@google.com
34cccde630 Allow GrEffects with multiple textures.
It will work as long as the total number of textures sis less than GrDrawState::kNumStages. That will be fixed in a follow up CL.
Review URL: https://codereview.appspot.com/7040052

git-svn-id: http://skia.googlecode.com/svn/trunk@7023 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-04 18:34:30 +00:00
djsollen@google.com
ade109f57c Fix Android compiler warnings.
Review URL: https://codereview.appspot.com/7040053

git-svn-id: http://skia.googlecode.com/svn/trunk@7014 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-04 15:29:06 +00:00
bsalomon@google.com
11f20d6270 Remove GrInstanceCounter.
R=reed@google.com
Review URL: https://codereview.appspot.com/6849125

git-svn-id: http://skia.googlecode.com/svn/trunk@6972 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-02 19:57:10 +00:00
skia.committer@gmail.com
2859eb74f9 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6921 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-21 02:01:28 +00:00
bsalomon@google.com
0797c2ccea Reland 6914 w/ fixes.
git-svn-id: http://skia.googlecode.com/svn/trunk@6916 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 15:13:01 +00:00
bsalomon@google.com
0b6ad2297f Revert 6914 to fix build issues.
git-svn-id: http://skia.googlecode.com/svn/trunk@6915 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 14:23:26 +00:00
bsalomon@google.com
4b86e3428b Simplify cache IDs and keys.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6954047

git-svn-id: http://skia.googlecode.com/svn/trunk@6914 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 14:18:10 +00:00
robertphillips@google.com
6d0673042f Accelerate AA filled rect drawing using drawIndexedInstances
https://codereview.appspot.com/6947078/



git-svn-id: http://skia.googlecode.com/svn/trunk@6889 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-18 21:47:47 +00:00
sugoi@google.com
5f74cf8c49 Follow up on the previous patch :
- Moved the SkStrokeRec class in its own file
- Replaced SkStroke by SkStrokeRec in Ganesh
- Moved path stroking to the Ganesh level in some cases (everytime it isn't required to do it directly in SkGpuDevice). PathEffect and MaskFilter still require path stroking at the SkGpuDevice for now.
- Renamed static functions in SkPath with proper names

* No functionality shold have changed with this patch. This is a step towards enabling Ganesh Path Renderers to decide whether or not to stroke the path rather than always receiving the stroked path as an input argument.

BUG=chromium:135111
TEST=Try path rendering tests from the gm
Review URL: https://codereview.appspot.com/6946072

git-svn-id: http://skia.googlecode.com/svn/trunk@6861 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-17 21:16:45 +00:00
bsalomon@google.com
9f6a557548 Remove unused type GrCacheKey
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6947074

git-svn-id: http://skia.googlecode.com/svn/trunk@6858 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-17 20:44:22 +00:00
reed@google.com
dd335aeb5d Change to BDS license (as we did with all the other files that were Apache)
Review URL: https://codereview.appspot.com/6948045

git-svn-id: http://skia.googlecode.com/svn/trunk@6787 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-13 19:24:05 +00:00
skia.committer@gmail.com
c7b4be7f11 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6746 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-11 02:01:20 +00:00
bsalomon@google.com
45a15f551b Modifications to GrPatherRenderer(Chain) interfaces to support clip mask manager.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6904069

git-svn-id: http://skia.googlecode.com/svn/trunk@6741 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 19:10:17 +00:00
scroggo@google.com
a2a3192847 Fix some extract subset bugs.
In SkBitmap::extractSubset, perform a deepCopy, if the pixelRef supports it.

Fixes a bug in the 'extractbitmap' gm, which attempts to draw a subset of a texture backed bitmap (if the canvas is really an SkGpuCanvas).

Also fix some bugs that happen when there is a pixel offset. These fixes get bypassed by the deepCopy, but a user can still set a pixel offset manually.

When copying GPU backed bitmap with a pixel offset, copy the offset.

If the new config is the same as the old, copy fRowBytes as well.

Add a function to SkBitmap.cpp (getUpperLeftFromOffset) to find the x,y coordinate to use when copying to a new config.

Fix a bug where readPixels copied to the correct desired config and we were setting the generation ID to match even though the desired config was not the same as the original config (caught by my new tests!).

Add some tests to verify the correct behavior.

Review URL: https://codereview.appspot.com/6839043

git-svn-id: http://skia.googlecode.com/svn/trunk@6710 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 19:14:45 +00:00
sugoi@google.com
12b4e27ae1 As part of preliminary groundwork for a chromium fix, this changelist is deprecating GrPathFill so that SkPath::FillType is used everywhere in order to remove some code duplication between Skia and Ganesh.
BUG=chromium:135111
TEST=Try path rendering tests from the gm
Review URL: https://codereview.appspot.com/6875058

git-svn-id: http://skia.googlecode.com/svn/trunk@6693 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 20:13:11 +00:00
bsalomon@google.com
42619d8df2 Rename SkTDLinkedList to SkTInternalLinked list, add some methods useful for forthcoming SkTLList.
Review URL: https://codereview.appspot.com/6858101

git-svn-id: http://skia.googlecode.com/svn/trunk@6643 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 14:54:59 +00:00
senorblanco@chromium.org
e0d44ff614 Add support for new glShaderSource() signature from Khronos. Disabled by default.
Review URL: https://codereview.appspot.com/6853068

git-svn-id: http://skia.googlecode.com/svn/trunk@6491 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-19 20:43:10 +00:00
senorblanco@chromium.org
f9a1455ef1 Avoid re-definition of STDC symbols, needed for my ffmpeg work.
See changes to build/common.gypi in https://codereview.chromium.org/11364077/

BUG=118986, 91970

Review URL: https://codereview.appspot.com/6810088
Patch from Paweł Hajdan, Jr. <phajdan.jr@chromium.org>.

git-svn-id: http://skia.googlecode.com/svn/trunk@6313 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-06 18:36:33 +00:00
skia.committer@gmail.com
1aa90cf11e Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6306 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-06 13:18:25 +00:00
bsalomon@google.com
dbe49f7354 Remove default texture coords / texture matrix
Review URL: https://codereview.appspot.com/6775100

git-svn-id: http://skia.googlecode.com/svn/trunk@6293 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-05 16:36:02 +00:00
robertphillips@google.com
4187a2fc71 Attempt to patch Chrome compiler failures
git-svn-id: http://skia.googlecode.com/svn/trunk@6289 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-05 01:31:44 +00:00
bsalomon@google.com
b4a55b7b68 Make morphology, convolution, and table color filter opt out of default texture matrices.
Review URL: https://codereview.appspot.com/6817077

git-svn-id: http://skia.googlecode.com/svn/trunk@6280 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-02 20:45:37 +00:00
bsalomon@google.com
b9086a0268 Replace GrMatrix with SkMatrix.
Review URL: https://codereview.appspot.com/6814067

git-svn-id: http://skia.googlecode.com/svn/trunk@6247 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 18:02:54 +00:00
borenet@google.com
7158e6acca Improve NaCl support
- Add nacl_make script to build Skia targets for NaCl using gyp
- Add nacl_interface for command-line apps
- Add nacl_sample as front-end for SampleApp
- Add freetype to DEPS
- Various gyp tweaks for NaCl

TODO:
- Implement GL interface
- Implement font host
- Fix plumbing so that SampleApp works properly
Review URL: https://codereview.appspot.com/6671044

git-svn-id: http://skia.googlecode.com/svn/trunk@6245 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 17:43:44 +00:00
bsalomon@google.com
8171288341 Remove GrScalar, replace with SkScalar.
Review URL: https://codereview.appspot.com/6812064

git-svn-id: http://skia.googlecode.com/svn/trunk@6243 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 17:12:34 +00:00
bsalomon@google.com
d8b5faca04 Reland r6233 with fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@6241 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 17:02:46 +00:00
bsalomon@google.com
115b06f3d5 Re-revert r6233.
git-svn-id: http://skia.googlecode.com/svn/trunk@6239 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 15:47:55 +00:00
bsalomon@google.com
c3a58f345d Reland r6233 with fix for config conversion texture matrices.
git-svn-id: http://skia.googlecode.com/svn/trunk@6238 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 15:40:47 +00:00
bsalomon@google.com
66e534da8e Revert r6233 while investigating bot failures.
git-svn-id: http://skia.googlecode.com/svn/trunk@6235 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 14:02:43 +00:00
bsalomon@google.com
ce49e16d3b Checkpoint in moving texture matrices out of GrGLProgram and into GrGLEffect.
Review URL: https://codereview.appspot.com/6818064

git-svn-id: http://skia.googlecode.com/svn/trunk@6233 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 13:50:50 +00:00
skia.committer@gmail.com
f3dc199c0b Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6228 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 02:01:27 +00:00
robertphillips@google.com
d3eb336d56 Add validation check to GrGpu::createTexture & minor SkGpuDevice cleanup
https://codereview.appspot.com/6821055/



git-svn-id: http://skia.googlecode.com/svn/trunk@6213 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-31 13:56:35 +00:00
bsalomon@google.com
4b2e1c8807 Rebase gpu_dev up to r5182
git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6187 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-29 20:13:42 +00:00
bsalomon@google.com
56315b979b Add file accidentally omitted from r6182.
git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6186 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-29 20:02:06 +00:00
bsalomon@google.com
2eaaefd7e6 Pass GrCustomStage to key-generation functions and emitCode().
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6819046

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6182 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-29 19:51:22 +00:00
djsollen@google.com
42041e6de8 Allow default texture cache limit to be set within gyp.
Review URL: https://codereview.appspot.com/6818051

git-svn-id: http://skia.googlecode.com/svn/trunk@6177 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-29 19:24:45 +00:00
bsalomon@google.com
484ee2a5fe Make GrEffectStage keep a const ptr (rather than non-const) to GrEffect.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6811045

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6166 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-29 16:25:04 +00:00
bsalomon@google.com
2d0baded0f Make the orientation of a texture accessible from and known by GrSurface.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6801044

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6148 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-26 19:01:17 +00:00
bsalomon@google.com
28a15fb8d6 Make GrGLEffect::setData take GrEffectStage rather than GrEffect.
This allows the coord-change matrix to be communicated to setData(). An accessor for this matrix is also added to GrEffectStage.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6779057

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6143 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-26 17:53:18 +00:00
bsalomon@google.com
08283afc26 Rename GrSamplerState to GrEffectStage.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6777053

git-svn-id: http://skia.googlecode.com/svn/trunk@6135 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-26 13:01:20 +00:00
skia.committer@gmail.com
27b40e9f36 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6133 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-26 02:01:24 +00:00
bsalomon@google.com
46fba0d793 Rename StageKey and related stuff.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6785049

git-svn-id: http://skia.googlecode.com/svn/trunk@6130 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 21:42:05 +00:00
bsalomon@google.com
396e61fe44 Rename GrProgramStageFactory to GrBackendEffectFactory.
Review URL: https://codereview.appspot.com/6773044

git-svn-id: http://skia.googlecode.com/svn/trunk@6125 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 19:00:29 +00:00
bsalomon@google.com
08afc843c0 Files accidentally omitted from r6123.
git-svn-id: http://skia.googlecode.com/svn/trunk@6124 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 18:56:10 +00:00
bsalomon@google.com
16e3ddea6a Platform/Engine -> Backend
createPlatform -> wrapBackend

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6785044

git-svn-id: http://skia.googlecode.com/svn/trunk@6123 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 18:43:28 +00:00
bsalomon@google.com
422e81aeb1 GrGLProgramStage Renaming Part 3
s/GLProgramStage/GLEffect
minor whitespace/spelling fixup

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6767054

git-svn-id: http://skia.googlecode.com/svn/trunk@6095 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 14:11:03 +00:00
bsalomon@google.com
d698f77c13 GrGLProgramStage Renaming Part 1.
Renamed cpp and h
s/GrGLProgramStage/GrGLEffect/
Review URL: https://codereview.appspot.com/6759054

git-svn-id: http://skia.googlecode.com/svn/trunk@6090 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 13:22:00 +00:00
bsalomon@google.com
021fc736f8 GrCustomStage Renaming Part 5
Stuff found by searching for "stage".

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6772043

git-svn-id: http://skia.googlecode.com/svn/trunk@6089 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 12:47:42 +00:00
bsalomon@google.com
8ea78d83dc GrCustomStage Renaming Part 4
Rename a bunch of things found by searching for "custom".
Review URL: https://codereview.appspot.com/6765048

git-svn-id: http://skia.googlecode.com/svn/trunk@6085 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-24 20:11:30 +00:00
bsalomon@google.com
f271cc7183 GrCustomStage Renaming Part 3
Rename all things *CUSTOM_STAGE*, customStage*, and other miscellany

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6769048

git-svn-id: http://skia.googlecode.com/svn/trunk@6081 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-24 19:35:13 +00:00
bsalomon@google.com
6f261bed02 GrCustomStage Renaming Part 2
GrSamplerState member rename
GrCustomStageUnitTest rename
some comment updates
Review URL: https://codereview.appspot.com/6771043

git-svn-id: http://skia.googlecode.com/svn/trunk@6078 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-24 19:07:10 +00:00
bsalomon@google.com
a469c28c3c CustomStage Renaming Part 1
Search and replace:
GrCustomStage->GrEffect
GrCustomStageTestFactory->GrEffectTestFactory

renamed the cpp/h files from customStage->effect

reordered gypi, #includes, forward decls to maintain alphabetical sort.

manually fixed up some whitespace and linewraps

deleted a commented out #include

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6758046

git-svn-id: http://skia.googlecode.com/svn/trunk@6076 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-24 18:28:34 +00:00
skia.committer@gmail.com
989a95ea77 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5989 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-18 02:01:23 +00:00
bsalomon@google.com
67e78c9e47 Use GrCustomStage to implement color matrix.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6716044

git-svn-id: http://skia.googlecode.com/svn/trunk@5975 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-17 13:36:14 +00:00
bsalomon@google.com
288d9549b4 Separate out the texture matrix from the coord-system change matrix in GrSamplerState. This is a step towards moving texture matrix to GrCustomStage.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6721047

git-svn-id: http://skia.googlecode.com/svn/trunk@5973 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-17 12:53:54 +00:00
bsalomon@google.com
dfdb7e5240 Reland r5963 with two fixes:
Missing ref in GrSweepGradient::TestCreate.
Must reset() the sampler in setup_drawstate_aaclip() to avoid hitting a (dubious) assert.



git-svn-id: http://skia.googlecode.com/svn/trunk@5964 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-16 15:19:45 +00:00
bsalomon@google.com
f6eac8af58 Revert r5962 because of failures.
git-svn-id: http://skia.googlecode.com/svn/trunk@5963 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-16 14:31:26 +00:00
bsalomon@google.com
b022177777 Require matrix for custom stage to be set when custom stage is installed.
Review URL: https://codereview.appspot.com/6696044

git-svn-id: http://skia.googlecode.com/svn/trunk@5962 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-16 14:16:11 +00:00
bsalomon@google.com
858804dfe6 Use AutoMatrix in GrTextContext
Review URL: https://codereview.appspot.com/6691043

git-svn-id: http://skia.googlecode.com/svn/trunk@5952 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-15 14:25:50 +00:00
bsalomon@google.com
1e269b5a08 Spell correct some comments.
Unreviewed



git-svn-id: http://skia.googlecode.com/svn/trunk@5951 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-15 14:25:31 +00:00
skia.committer@gmail.com
f57c01bdcf Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5943 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-13 02:01:56 +00:00
bsalomon@google.com
a99226eb8c Commit SkGpuDevice.h which was omitted from r5918 for some reason.
git-svn-id: http://skia.googlecode.com/svn/trunk@5919 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-12 15:01:38 +00:00
bsalomon@google.com
3cbaa2d4da Beef up GrContext::AutoMatrix to handle doing GrPaint matrix adjustments.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6656047

git-svn-id: http://skia.googlecode.com/svn/trunk@5918 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-12 14:51:52 +00:00
bsalomon@google.com
3ab43d5c5b Minimize use of SkDraw's matrix in SkGpuDevice.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6604068

git-svn-id: http://skia.googlecode.com/svn/trunk@5906 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-11 19:39:09 +00:00
bsalomon@google.com
a6926b1f03 Reland r5861 but leave setMatrixClip virtual on SkDevice (IOW this is a partial revert of r5871 which reverted r5861).
Unreviewed
Review URL: https://codereview.appspot.com/6631062

git-svn-id: http://skia.googlecode.com/svn/trunk@5881 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-10 15:25:50 +00:00
robertphillips@google.com
3fffb2ee9f Reverting r5861 (remove gainfocus and setMatixClip) due to Chrome compilation issues
git-svn-id: http://skia.googlecode.com/svn/trunk@5871 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-09 22:30:18 +00:00
bsalomon@google.com
a1c3d78f22 Remove gainFocus() and setMatrixClip() virtuals from SkDevice.
R=reed@google.com,robertphillips@google.com
Review URL: https://codereview.appspot.com/6636050

git-svn-id: http://skia.googlecode.com/svn/trunk@5861 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-09 14:20:37 +00:00
bsalomon@google.com
0e354aacd8 Remove external matrix feature.
We haven't been testing this for nearly two years.

R=reed@google.com
Review URL: https://codereview.appspot.com/6640044

git-svn-id: http://skia.googlecode.com/svn/trunk@5857 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-08 20:44:25 +00:00
bsalomon@google.com
0f11e1ab5b Remove translate param from GrContext::drawPath (and subsequent calls).
Review URL: https://codereview.appspot.com/6615062

git-svn-id: http://skia.googlecode.com/svn/trunk@5852 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-08 14:48:36 +00:00
bsalomon@google.com
c7448cef09 GrPaint encapsulation.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6624052

git-svn-id: http://skia.googlecode.com/svn/trunk@5838 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-05 19:04:13 +00:00
bsalomon@google.com
88becf450f Rename GrPaint fields/enums/members texture->color mask->coverage.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6615046

git-svn-id: http://skia.googlecode.com/svn/trunk@5827 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-05 14:54:42 +00:00
bsalomon@google.com
af84e748ce Move setPaint from GrContext to GrDrawState.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6624045

git-svn-id: http://skia.googlecode.com/svn/trunk@5823 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-05 13:23:24 +00:00
bsalomon@google.com
e6e62d1de9 Make numTextures() be non-virtual on GrCustomStage.
R=tomhudson@google.com,robertphillips@google.com,senorblanco@chromium.org
Review URL: https://codereview.appspot.com/6586081

git-svn-id: http://skia.googlecode.com/svn/trunk@5805 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-04 14:38:48 +00:00
bsalomon@google.com
2b64f84b4b Add SkNativeGLContext implementation for iOS.
R=caryclark@google.com
Review URL: https://codereview.appspot.com/6589055

git-svn-id: http://skia.googlecode.com/svn/trunk@5767 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-02 15:25:12 +00:00
skia.committer@gmail.com
dc3a4e5fa8 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5762 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-02 02:01:24 +00:00
robertphillips@google.com
ccb3950409 Speculative render target ref/unref fixes
https://codereview.appspot.com/6592051/



git-svn-id: http://skia.googlecode.com/svn/trunk@5754 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-01 18:25:13 +00:00
reed@google.com
7ec0015ec3 delete obsolete/unused SkGpuCanvas
git-svn-id: http://skia.googlecode.com/svn/trunk@5752 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-01 18:06:05 +00:00
skia.committer@gmail.com
22b460cef6 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5735 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-29 02:01:02 +00:00
robertphillips@google.com
bac6b0575a Update Ganesh to support fractional rects in drawBitmapRect
https://codereview.appspot.com/6561070/



git-svn-id: http://skia.googlecode.com/svn/trunk@5724 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-28 18:06:49 +00:00
reed@google.com
33535f3c48 Reimplement drawBitmapRectToRect to correctly handle fraction srcRect.
The prev impl relied on drawBitmap "deducing" the destination rect by applying
the computed matrix to the bitmap's bounds. This cannot be done if the srcRect
is fractional, and therefore not representable w/ a bitmap.

The new impl computes the same matrix, but calls down to the device via drawRect
+ a bitmap_shader. This allows us to specfiy the dstRect explicitly.

The possible down-side is that we now rely on the device subclass to efficiently
handle draRect+shader, instead of calling its drawBitmap entry-point.

To give the device the chance to handle this differently, I now call through to
a new device virtual: drawBitmapRect. The default impl is to create the shader
and call drawRect, but a subclass can intercept that.

For now, the GPU override of drawBitmapRect is mimicing the old behavior (by
rounding the srcRect to an iRect). This preserves its ability to call drawBitmap
which handles very-large textures, but shows some gittering/imprecision, due to
the rounding. ... this is the same GPU behavior we have before this CL.
Review URL: https://codereview.appspot.com/6542065

git-svn-id: http://skia.googlecode.com/svn/trunk@5663 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-25 15:37:50 +00:00
robertphillips@google.com
cdb426d55a Fix for GrTextureStripAtlas memory leak
https://codereview.appspot.com/6549050/



git-svn-id: http://skia.googlecode.com/svn/trunk@5648 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-24 19:33:59 +00:00
bsalomon@google.com
db545aec72 Fix GrTextureAccess::operator ==
compare the textures, correctly intepret memcmp result, don't compare last byte of swizzle array which must be 0.

BUG=895
Review URL: https://codereview.appspot.com/6542048

git-svn-id: http://skia.googlecode.com/svn/trunk@5605 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-20 15:37:30 +00:00
bsalomon@google.com
1ce49fc917 Move GrTextureParams from GrSamplerState to GrTextureAccess
Review URL: https://codereview.appspot.com/6496135/



git-svn-id: http://skia.googlecode.com/svn/trunk@5582 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-18 14:14:49 +00:00
bsalomon@google.com
7534747e63 Add GrColor to RGBA float helper func
Review URL: https://codereview.appspot.com/6518044/





git-svn-id: http://skia.googlecode.com/svn/trunk@5572 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-17 17:23:21 +00:00
borenet@google.com
dabdd9e71d Revert r5491, r5495, r5497, and r5498.
Review URL: https://codereview.appspot.com/6499097

git-svn-id: http://skia.googlecode.com/svn/trunk@5501 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 20:39:09 +00:00
borenet@google.com
bcfa637e7d printf->SkDebugf for r5491
Over-the-shoulder review by robertphillips@

git-svn-id: http://skia.googlecode.com/svn/trunk@5495 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 19:00:37 +00:00
borenet@google.com
fb3dd3a6f5 Temporarily add logging to GrContextFactory and SkNativeGLContext_android
Over-the-shoulder review from robertphillips@ and bsalomon@

Will revert soon.
Review URL: https://codereview.appspot.com/6496110

git-svn-id: http://skia.googlecode.com/svn/trunk@5491 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 18:35:35 +00:00
bsalomon@google.com
6d003d1ddc Wrap all GrCustomStage textures in GrTextureAccess, remove StageDesc::fInConfigFlags
Review URL: https://codereview.appspot.com/6494114



git-svn-id: http://skia.googlecode.com/svn/trunk@5485 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 15:45:20 +00:00
bsalomon@google.com
047696c1c6 Move GrTextureAccess decl/defn to separate files
Review URL: https://codereview.appspot.com/6500104/



git-svn-id: http://skia.googlecode.com/svn/trunk@5482 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 13:29:29 +00:00
skia.committer@gmail.com
d6ce0db164 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5456 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-10 02:01:22 +00:00
robertphillips@google.com
9fbcad0f00 Removed old resource locking system
https://codereview.appspot.com/6488098/



git-svn-id: http://skia.googlecode.com/svn/trunk@5453 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-09 14:44:15 +00:00
robertphillips@google.com
50a035ddbb Added explicit cache clearing
http://codereview.appspot.com/6492094/



git-svn-id: http://skia.googlecode.com/svn/trunk@5444 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-07 19:44:33 +00:00
skia.committer@gmail.com
6c778164a7 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5410 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-06 02:01:13 +00:00
robertphillips@google.com
d364554bcf Enforce calling of inherited onRelease & onAbandon mthds in GrResource-derived classes
http://codereview.appspot.com/6499077/



git-svn-id: http://skia.googlecode.com/svn/trunk@5405 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-05 18:37:39 +00:00
robertphillips@google.com
d6bbbf8a83 Simplified stencil buffer caching
https://codereview.appspot.com/6503073/



git-svn-id: http://skia.googlecode.com/svn/trunk@5400 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-05 15:46:34 +00:00
robertphillips@google.com
9474ed0617 Switch GrGpu's GrResource list over to using SkTDLinkedList
https://codereview.appspot.com/6500062/



git-svn-id: http://skia.googlecode.com/svn/trunk@5379 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-04 13:34:32 +00:00
robertphillips@google.com
5955202c80 Allow cache tracking to be enabled in release
https://codereview.appspot.com/6500057/



git-svn-id: http://skia.googlecode.com/svn/trunk@5365 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-31 13:07:37 +00:00
robertphillips@google.com
a9b0623eac Added find, lock to GrContext & GrResourceCache interfaces
https://codereview.appspot.com/6499052/



git-svn-id: http://skia.googlecode.com/svn/trunk@5343 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-30 11:06:31 +00:00
bsalomon@google.com
5e497329bb Fix int64->int32 warning
git-svn-id: http://skia.googlecode.com/svn/trunk@5330 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 21:45:26 +00:00
bsalomon@google.com
8090e651fc Make the SkGrPixelRef be responsible for unlocking device's scratch texture in the cache
Review URL: https://codereview.appspot.com/6498046/



git-svn-id: http://skia.googlecode.com/svn/trunk@5313 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 15:07:11 +00:00
bsalomon@google.com
a292112154 Remove SkGpuDevice::fTexture, use new pixel ref class name
Review URL: https://codereview.appspot.com/6474068/


git-svn-id: http://skia.googlecode.com/svn/trunk@5307 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 12:34:17 +00:00
bsalomon@google.com
a04e8e8424 Do premul and r/b swap conversions in a custom effect
Review URL: https://codereview.appspot.com/6473060/



git-svn-id: http://skia.googlecode.com/svn/trunk@5284 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-27 12:53:13 +00:00
rmistry@google.com
fbfcd56021 Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:09:54 +00:00
senorblanco@chromium.org
84207c4278 Move the code for the GPU implementation of morphology effects from GrContext
and GrMorphologyEffect.* into SkMorphologyImageFilter.cpp.

Review URL:  https://codereview.appspot.com/6458065/



git-svn-id: http://skia.googlecode.com/svn/trunk@5241 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-22 20:51:19 +00:00
robertphillips@google.com
521eaf8cc7 Scratch textures are no longer removed from the cache in Debug
http://codereview.appspot.com/6465079/



git-svn-id: http://skia.googlecode.com/svn/trunk@5221 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-22 11:03:19 +00:00
robertphillips@google.com
5f9f2f574f Added resource cache debug output to help track changes
http://codereview.appspot.com/6463079/



git-svn-id: http://skia.googlecode.com/svn/trunk@5220 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-22 10:57:05 +00:00
bsalomon@google.com
0342a85091 Remove _UPM_ GrPixelConfigs
Review URL: http://codereview.appspot.com/6460113/



git-svn-id: http://skia.googlecode.com/svn/trunk@5196 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 19:22:38 +00:00
bsalomon@google.com
07ea2db026 Remove unnecessary GrContext flushes
Review URL: http://codereview.appspot.com/6446150/



git-svn-id: http://skia.googlecode.com/svn/trunk@5150 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-17 14:06:49 +00:00
bsalomon@google.com
1d4edd38f6 Make all GrContext draws go through the draw buffer.
Review URL: http://codereview.appspot.com/6462069/


git-svn-id: http://skia.googlecode.com/svn/trunk@5136 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-16 18:36:06 +00:00
robertphillips@google.com
1f47f4f732 Replaced TextureCacheEntry with GrTexture* and a back pointer to GrResourceEntry (in GrTexture)
http://codereview.appspot.com/6460089/



git-svn-id: http://skia.googlecode.com/svn/trunk@5122 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-16 14:49:16 +00:00
keyar@chromium.org
5bdef29ae0 GrContextFactory can now expose the GLContext it is using.
Review URL: https://codereview.appspot.com/6461081

git-svn-id: http://skia.googlecode.com/svn/trunk@5105 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-14 22:02:48 +00:00
rileya@google.com
2e2aedc204 Added GrTextureStripAtlas object.
Review URL: https://codereview.appspot.com/6457099

git-svn-id: http://skia.googlecode.com/svn/trunk@5070 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-13 20:28:48 +00:00
robertphillips@google.com
3319f33470 Move resize functionality out of createAndLockTexture and into createResizedTexture
http://codereview.appspot.com/6459080/



git-svn-id: http://skia.googlecode.com/svn/trunk@5066 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-13 18:00:36 +00:00
robertphillips@google.com
9c2ea84635 Split cache-specific fields out of GrTextureDesc
http://codereview.appspot.com/6448143/



git-svn-id: http://skia.googlecode.com/svn/trunk@5065 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-13 17:47:59 +00:00
bsalomon@google.com
82aa7482cb Add a zoom filter to Skia. This will be used on ChromeOS to implement the screen magnifier.
Committed on behalf of zork@chromium.org

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


git-svn-id: http://skia.googlecode.com/svn/trunk@5056 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-13 14:22:17 +00:00
robertphillips@google.com
5091b7094b Added resource domain to GrTextureDesc
https://codereview.appspot.com/6459062/



git-svn-id: http://skia.googlecode.com/svn/trunk@5028 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-09 10:49:39 +00:00
robertphillips@google.com
1aad28ae16 GrCacheID.h must reside in include\gpu due to inclusion by GrTexture.h
git-svn-id: http://skia.googlecode.com/svn/trunk@5003 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-08 11:07:55 +00:00
robertphillips@google.com
46a8600405 Refactored cacheID in preparation for clip mask caching changes
http://codereview.appspot.com/6458089/



git-svn-id: http://skia.googlecode.com/svn/trunk@5002 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-08 10:42:44 +00:00
reed@google.com
b932407520 add LF at the end, since this is SO important the chrome-mac build failed.
git-svn-id: http://skia.googlecode.com/svn/trunk@4957 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-06 14:37:22 +00:00
bsalomon@google.com
8d3d210e74 Ensure that enums used by GrCustomStage TestCreate functions are declared in SK_ALLOW_GLOBAL_STATIC_INITIALIZERS=0 builds (e.g. android)
git-svn-id: http://skia.googlecode.com/svn/trunk@4953 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-03 18:49:51 +00:00
bsalomon@google.com
2a48c3adb7 Fix includes files missing in release builds from GrCustomStageUnitTest.h.
Also fix SK_SUPPORT_GPU=0 build breaks in gmmain.cpp and GLProgramsTest.cpp




git-svn-id: http://skia.googlecode.com/svn/trunk@4947 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-03 14:54:45 +00:00
bsalomon@google.com
d472620458 Registry-based unit test for custom effects
Review URL: http://codereview.appspot.com/6447085/



git-svn-id: http://skia.googlecode.com/svn/trunk@4946 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-03 14:34:46 +00:00
twiz@google.com
a5e65ec434 Introduction of set of functions to manage generation of texture fetch shader code.
A new set of routines have been added to GrGLShaderBuilder to emit texture fetches, taking into consideration the format of the texture to be accessed, and the channel swizzle.  
Review URL: https://codereview.appspot.com/6446072

git-svn-id: http://skia.googlecode.com/svn/trunk@4919 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-02 15:15:16 +00:00
robertphillips@google.com
a2d71482db Removed GrClip & related classes
http://codereview.appspot.com/6450071/



git-svn-id: http://skia.googlecode.com/svn/trunk@4899 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-01 20:08:47 +00:00
robertphillips@google.com
641f8b19a6 Replace GrClip with SkClipStack
http://codereview.appspot.com/6449070/



git-svn-id: http://skia.googlecode.com/svn/trunk@4865 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 19:15:58 +00:00
robertphillips@google.com
7b11289b4e Added dev- & canv- prefixes to Ganesh bounding boxes to indicate coordinate space
http://codereview.appspot.com/6457061/



git-svn-id: http://skia.googlecode.com/svn/trunk@4856 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 15:18:21 +00:00
robertphillips@google.com
f8d904a7ee GrClip no longer translates its clips (to better mimic SkClipStack's behavior)
http://codereview.appspot.com/6445052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4848 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 12:18:16 +00:00
bsalomon@google.com
cddaf340f1 Remove GrDrawState::setTexture/getTexture
Review URL: http://codereview.appspot.com/6455051/



git-svn-id: http://skia.googlecode.com/svn/trunk@4826 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-30 13:09:05 +00:00
robertphillips@google.com
e4d69c0e46 Added getConservativeBound helper function to GrClipData
http://codereview.appspot.com/6454054/



git-svn-id: http://skia.googlecode.com/svn/trunk@4798 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 21:37:40 +00:00
bsalomon@google.com
1c31f63323 Remove texture/mask setters on GrPaint
Review URL: http://codereview.appspot.com/6446052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4790 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 19:39:06 +00:00
robertphillips@google.com
beb1af78d0 Altered Ganesh's clip stack plumbing to pass down new GrClipData class
http://codereview.appspot.com/6454047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4788 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 18:52:16 +00:00
bsalomon@google.com
b8670998a5 Move filter/wrap out of GrSamplerState into GrTextureParams
Review URL: http://codereview.appspot.com/6440046/




git-svn-id: http://skia.googlecode.com/svn/trunk@4773 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 21:27:09 +00:00
tomhudson@google.com
dcba4c2cc3 Use GrMemoryPool to manage GrCustomStage allocations.
Improve memory reclamation of GrMemoryPool for new/delete/new/delete pattern.

http://codereview.appspot.com/6438046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4744 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 21:36:16 +00:00
robertphillips@google.com
a6f11c4f71 Gave GrClip an SkClipStack-style iterator
http://codereview.appspot.com/6434046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4723 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 17:39:44 +00:00
tomhudson@google.com
1e8f016305 Remove easily-removable uses of setTexture(), instead creating a GrSingleTextureEffect -
where feasible, through convenience function on GrDrawState.

http://codereview.appspot.com/6425055/



git-svn-id: http://skia.googlecode.com/svn/trunk@4694 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 16:25:18 +00:00
robertphillips@google.com
80214e26c5 Made clarifying renamings to SkClipStack's iterators (and added to unit test)
http://codereview.appspot.com/6423051/



git-svn-id: http://skia.googlecode.com/svn/trunk@4692 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 15:33:18 +00:00
bsalomon@google.com
e3d3216fe1 Remove stage masks
Review URL: http://codereview.appspot.com/6422047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4688 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 13:37:06 +00:00
rileya@google.com
24f3ad1bbb Move texture lock/unlock functions from SkGpuDevice into SkGr as global functions, also removed inconsistent "SkGr" class.
Review URL: https://codereview.appspot.com/6420048

git-svn-id: http://skia.googlecode.com/svn/trunk@4664 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 21:47:40 +00:00
twiz@google.com
5807116946 This CL implements the Ganesh path for the SkTable_ColorFilter color transformation.
A new texture stage dedicated to color transforms has been added, along with the new custom stage implementing the LUT.
Review URL: https://codereview.appspot.com/6351081

git-svn-id: http://skia.googlecode.com/svn/trunk@4663 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 21:41:50 +00:00
senorblanco@chromium.org
1e95d715d0 Clean up the use of AutoScratchTexture in the gaussian blur and morphology
filters.  Instead of passing in AutoScratchTextures for temporaries, we allocate
them inside the function and detach() after rendering.  Since the functions now
return a ref()'ed texture, we no longer ref() the result in filter_texture().

Also, the imageblur gm was passing a paint with an image filter both to
saveLayer()/restore(), and to every text draw call.  Back when only restore()
was applying filters, this was fine, but since we're now applying filters on all
draw calls, this means we're double-blurring in this GM.

I've reverted the Mac baselines for the imageblur GM to their previous versions;
hopefully this will be correct.



git-svn-id: http://skia.googlecode.com/svn/trunk@4659 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 19:52:53 +00:00
tomhudson@google.com
2f68e7684b Move texture domains onto a GrCustomStage, off of GrSamplerState.
This will require gyp changes to roll into Chrome.

http://codereview.appspot.com/6405050/



git-svn-id: http://skia.googlecode.com/svn/trunk@4641 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-17 18:43:21 +00:00
tomhudson@google.com
e742bf0ab1 Start removing calls to GrDrawState::setTexture() (and GrPaint::setTexture()?) when there's
a GrSingleTextureEffect involved holding the texture.

http://codereview.appspot.com/6353094/



git-svn-id: http://skia.googlecode.com/svn/trunk@4608 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 19:54:19 +00:00
robertphillips@google.com
40a1ae4df2 Added SkDevice onAttachToCanvas & onDetachFromCanvas methods
http://codereview.appspot.com/6348100/



git-svn-id: http://skia.googlecode.com/svn/trunk@4598 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 15:36:15 +00:00
tomhudson@google.com
d0c1a06cb9 Introduces new SingleTextureEffect base class for GrCustomStage objects.
This class tracks the texture that the object uses. A future commit will get rid of the
GrTexture pointer currenty stored in the GrDrawState, allowing us to have CustomStages
*without* textures.

Requires gyp change on next roll.

http://codereview.appspot.com/6306097/



git-svn-id: http://skia.googlecode.com/svn/trunk@4576 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-12 17:23:52 +00:00
robertphillips@google.com
56c79b1037 Added GrContext::AutoClipStack to encapsulate setting\resetting of clip stack
http://codereview.appspot.com/6343097/



git-svn-id: http://skia.googlecode.com/svn/trunk@4558 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 20:57:46 +00:00
robertphillips@google.com
fea85ac3e3 Minor refactoring to make GrAutoMatrix a nested sub-class of GrContext
http://codereview.appspot.com/6356092/



git-svn-id: http://skia.googlecode.com/svn/trunk@4549 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 18:53:23 +00:00
robertphillips@google.com
3e11c0bd92 Forced GrClip to always have conservative bounds
http://codereview.appspot.com/6353089/



git-svn-id: http://skia.googlecode.com/svn/trunk@4545 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 18:20:35 +00:00
senorblanco@chromium.org
894790d77c This patch implements the diffuse and specular lighting filters in Ganesh.
There are three light types for each:  distant, point and spot, whose code
generation lives in a GrGLLight class hierarchy.  This similar to the CPU
implementation, where each light type provides a function to compute the vector
from the surface plane to the light (surfaceToLight) and to compute the light
colour (emitLightColour).  Instead of templated member functions, as in the CPU
implementation, these are virtual functions to emit the light-specific GLSL
code.

All of the code for the GPU path lives in the same file as that for the CPU
path, SkLightingImageFilter.cpp.  In order to provide Ganesh a hook to access
it, SkImageFilter now has a asNewCustomStage() virtual, which allows an image
filter to return a GrCustomStage representing that filter.

Note that this patch does not handle the border conditions correctly (the
[top|bottom][Left|Right]Normal() functions in the CPU implementation).  That
will come in a future patch.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@4535 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 16:01:22 +00:00
robertphillips@google.com
59f46b81f8 Fixed Windows compiler complaints
http://codereview.appspot.com/6392044



git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:30:58 +00:00
tomhudson@google.com
c377baf406 Add placement new macros to SkPostConfig, call SkNEW* from Ganesh.
TODO: unify with the placement new implementation in SkTemplatesPriv.h,
once various issues there are overcome. reed@ should be taking the lead
there.

http://codereview.appspot.com/6384043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4492 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 20:17:56 +00:00
tomhudson@google.com
2c026196e7 Fix misnamed function in explanatory comment.
http://codereview.appspot.com/6387043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4489 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 19:07:41 +00:00
tomhudson@google.com
1dcfa1fcbd Fix definition of isEqual() for two gradient effect custom stages.
Expand comments defining isEqual() to better distinguish equality from
equivalence, which is more significant in Ganesh shader cache management.

http://codereview.appspot.com/6379043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4484 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:21:28 +00:00
robertphillips@google.com
54823c227d Rolling back r4034 (Proposed plumbing to propagate save & restore)
http://codereview.appspot.com/6346066/



git-svn-id: http://skia.googlecode.com/svn/trunk@4456 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-03 19:12:29 +00:00
robertphillips@google.com
41efe04af9 Partially rolled forward the SkGrPixelRef changes
http://codereview.appspot.com/6354060/



git-svn-id: http://skia.googlecode.com/svn/trunk@4415 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-29 20:55:14 +00:00
tomhudson@google.com
375ff85e96 Un-trifurcate GrTextContext: get rid of Default and Batched subclasses,
folding their functionality back into the base class.

Requires gyp changes.

http://codereview.appspot.com/6357048/



git-svn-id: http://skia.googlecode.com/svn/trunk@4411 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-29 18:37:57 +00:00
robertphillips@google.com
ecf1f3299a Temporarily readding SkGrTexturePixelRef.h/.cpp until WebKit is transitioned to SkGrPixelRef
git-svn-id: http://skia.googlecode.com/svn/trunk@4401 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 21:59:38 +00:00
robertphillips@google.com
5088eb49fe Moved SkGrTexturePixelRef to SkGrPixelRef
http://codereview.appspot.com/6344054/



git-svn-id: http://skia.googlecode.com/svn/trunk@4397 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 20:59:13 +00:00
robertphillips@google.com
d881bc194d Collapsed SkGrTexturePixelRef and SkGrRenderTargetPixelRef into SkGrPixelRef using new GrSurface class
http://codereview.appspot.com/6359045/



git-svn-id: http://skia.googlecode.com/svn/trunk@4396 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 20:02:39 +00:00
bsalomon@google.com
ded4f4b163 Initial support for GL_NV_path_renering. Experimental, there are still some issues to resolve, set gyp variable skia_nv_path_rendering=1 or build flag GR_GL_USE_NV_PATH_RENDERING to enable.
http://codereview.appspot.com/6349049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4390 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 18:48:06 +00:00
reed@google.com
fa35e3ddcc plumb SkInstCnt to all subclasses of GrRefCnt
git-svn-id: http://skia.googlecode.com/svn/trunk@4353 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 20:16:17 +00:00
tomhudson@google.com
f13f588046 Add GrPaint::*StageEnabled() and GrDrawState::stageEnabled() functions.
These wrap the question of "is this stage of the shader enabled?" so that
we can change the semantics - previously iff there was a texture, now
if there is a texture OR a GrCustomStage, soon (post-cl 6306097) iff there
is a GrCustomStage, which at that point will hold whatever texture is
necessary.

http://codereview.appspot.com/6306104/



git-svn-id: http://skia.googlecode.com/svn/trunk@4325 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-25 17:27:28 +00:00
bsalomon@google.com
07fc0d178e Revert r4287. Large numbers of textures created by random gradients can cause poor driver performance (at least on Mac)
BUG=670



git-svn-id: http://skia.googlecode.com/svn/trunk@4306 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 15:15:59 +00:00
robertphillips@google.com
15c0fea699 AutoScratchTexture can now release its texture and it will return to the texture cache when freed
http://codereview.appspot.com/6262043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4301 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 12:41:43 +00:00
bsalomon@google.com
5e24129831 Move GrTemplates.h to src
Review URL: http://codereview.appspot.com/6333053/


git-svn-id: http://skia.googlecode.com/svn/trunk@4300 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 12:34:22 +00:00
robertphillips@google.com
9ec075366e Altered GrDrawState to always ref texture and render target
http://codereview.appspot.com/6251049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4298 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 12:01:30 +00:00
robertphillips@google.com
7d501ab502 Add GrSurface parent class above GrTexture & GrRenderTarget
http://codereview.appspot.com/6297092/



git-svn-id: http://skia.googlecode.com/svn/trunk@4292 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 21:09:06 +00:00
robertphillips@google.com
15e9d3e66e Expanded distribution of instance counting
http://codereview.appspot.com/6300114/



git-svn-id: http://skia.googlecode.com/svn/trunk@4291 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 20:25:03 +00:00
robertphillips@google.com
c82a8b7aa4 Fixed two bugs in SW-only clip mask generation
http://codereview.appspot.com/6306086/



git-svn-id: http://skia.googlecode.com/svn/trunk@4290 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 20:15:48 +00:00
bsalomon@google.com
a320194e42 Make GrClipMaskManager configure the stencil and scissor on GrGpu
Review URL: http://codereview.appspot.com/6308096/



git-svn-id: http://skia.googlecode.com/svn/trunk@4288 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 19:58:20 +00:00
bsalomon@google.com
8f7e1dac5c Remove count budget from resource cache
Review URL: http://codereview.appspot.com/6312052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4287 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 19:48:32 +00:00
bsalomon@google.com
4da34e36cb Add GrMemoryPool as a helper to override operators new/delete
Review URL: http://codereview.appspot.com/6306090/



git-svn-id: http://skia.googlecode.com/svn/trunk@4282 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-19 15:40:27 +00:00
tomhudson@google.com
50e4ce0552 Fix memory leaks.
http://codereview.appspot.com/6301098/



git-svn-id: http://skia.googlecode.com/svn/trunk@4281 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-19 15:27:50 +00:00