aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
Commit message (Collapse)AuthorAge
...
* New subclasses for both Gr and GrGL gradient effect classes. Gravatar rileya@google.com2012-07-19
| | | | | | | | | This replaces GrSingleTextureEffect as the base for gradient effects (so we'll be able to do gradient effects without textures), and adds a base class to the GL gradient custom stage implementations (which will soon handle generating the appropriate code to pass colors in and lerp instead of using a cached texture for simpler gradient cases). Also added a custom stage for linear gradients. Review URL: https://codereview.appspot.com/6426049 git-svn-id: http://skia.googlecode.com/svn/trunk@4674 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move texture lock/unlock functions from SkGpuDevice into SkGr as global ↵Gravatar rileya@google.com2012-07-18
| | | | | | | | 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
* This CL implements the Ganesh path for the SkTable_ColorFilter color ↵Gravatar twiz@google.com2012-07-18
| | | | | | | | | 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
* Clean up the use of AutoScratchTexture in the gaussian blur and morphologyGravatar senorblanco@chromium.org2012-07-18
| | | | | | | | | | | | | | | | | | 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
* Fix grdrawstate == test when left side has disabled stage and right side ↵Gravatar bsalomon@google.com2012-07-18
| | | | | | | | | | does not Review URL: http://codereview.appspot.com/6427044/ git-svn-id: http://skia.googlecode.com/svn/trunk@4657 2bbb7eff-a529-9590-31e7-b0007b416f81
* Factory method for creating GrGLProgramGravatar bsalomon@google.com2012-07-18
| | | | | | | | Review URL: http://codereview.appspot.com/6407049/ git-svn-id: http://skia.googlecode.com/svn/trunk@4646 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix build breakage in r4641.Gravatar tomhudson@google.com2012-07-17
| | | | | | | | Unreviewed. git-svn-id: http://skia.googlecode.com/svn/trunk@4642 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move texture domains onto a GrCustomStage, off of GrSamplerState.Gravatar tomhudson@google.com2012-07-17
| | | | | | | | | | 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
* Fix test break in r4627.Gravatar bsalomon@google.com2012-07-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4628 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrGLProgram::CachedData, make GrGLProgram represent the programGravatar bsalomon@google.com2012-07-16
| | | | | | | | Review URL: http://codereview.appspot.com/6409043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4627 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix fs param name in conical gradient due to r4616.Gravatar bsalomon@google.com2012-07-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4617 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove uniform var pointers from custom effectsGravatar bsalomon@google.com2012-07-16
| | | | | | | | Review URL: http://codereview.appspot.com/6374067/ git-svn-id: http://skia.googlecode.com/svn/trunk@4616 2bbb7eff-a529-9590-31e7-b0007b416f81
* Having updated the documentation of GrCustomStage to argue that all custom ↵Gravatar tomhudson@google.com2012-07-16
| | | | | | | | | | | | stages must be immutable, this CL makes that true for ConvolutionEffect. http://codereview.appspot.com/6398043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4613 2bbb7eff-a529-9590-31e7-b0007b416f81
* Start removing calls to GrDrawState::setTexture() (and ↵Gravatar tomhudson@google.com2012-07-13
| | | | | | | | | | | | 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
* There were three different problems with lighting filters:Gravatar senorblanco@chromium.org2012-07-13
| | | | | | | | | | | | | | | | | | | | | | | 1) Texture offsets (fImageIncrement) have to be signed depending on whether the texture is "right way up" (texture upload) or "upside down" (render target), so the surface normals were coming out upside down. 2) Light normals have to y-negated on upload These two bugs were cancelling each other out in SampleApp, (where we were testing w/textures) but not in Chrome (where we were testing w/render targets). 3) The extract-the-height-from-the-view-matrix hack I was using to compare light positions vs. gl_FragCoord doesn't work in Chrome where we compile with GR_STATIC_RECT_VB, and the view matrix contains more than the viewport transform (to accomodate the canonical vertex buffer). Fixed by passing the destination render target to GrGLProgramStage::setData(), so it can flip the light positions in Y on the CPU. Review URL: http://codereview.appspot.com/6343109/ git-svn-id: http://skia.googlecode.com/svn/trunk@4605 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed over-length lines in GrGLCreateDebugInterface.cppGravatar robertphillips@google.com2012-07-13
| | | | | | | | http://codereview.appspot.com/6346104/ git-svn-id: http://skia.googlecode.com/svn/trunk@4601 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added SkDevice onAttachToCanvas & onDetachFromCanvas methodsGravatar robertphillips@google.com2012-07-13
| | | | | | | | http://codereview.appspot.com/6348100/ git-svn-id: http://skia.googlecode.com/svn/trunk@4598 2bbb7eff-a529-9590-31e7-b0007b416f81
* Introduces new SingleTextureEffect base class for GrCustomStage objects.Gravatar tomhudson@google.com2012-07-12
| | | | | | | | | | | | | | 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
* Refactor how precision is handled with GrGLShaderVarGravatar bsalomon@google.com2012-07-12
| | | | | | | Review URL: http://codereview.appspot.com/6392049/ git-svn-id: http://skia.googlecode.com/svn/trunk@4575 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix the lighting filters unit test and re-enable it.Gravatar senorblanco@chromium.org2012-07-12
| | | | | | | | Review URL: http://codereview.appspot.com/6355098/ git-svn-id: http://skia.googlecode.com/svn/trunk@4568 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added GrContext::AutoClipStack to encapsulate setting\resetting of clip stackGravatar robertphillips@google.com2012-07-11
| | | | | | | | http://codereview.appspot.com/6343097/ git-svn-id: http://skia.googlecode.com/svn/trunk@4558 2bbb7eff-a529-9590-31e7-b0007b416f81
* idea: add annotation to SkPaintGravatar reed@google.com2012-07-11
| | | | | | Review URL: https://codereview.appspot.com/6355050 git-svn-id: http://skia.googlecode.com/svn/trunk@4555 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix linux warningsGravatar bsalomon@google.com2012-07-11
| | | | | | | | Review URL: http://codereview.appspot.com/6354093/ git-svn-id: http://skia.googlecode.com/svn/trunk@4554 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix dumb copy/paste bug that breaks GLProgramTest on debug builds with GS ↵Gravatar bsalomon@google.com2012-07-11
| | | | | | support. git-svn-id: http://skia.googlecode.com/svn/trunk@4553 2bbb7eff-a529-9590-31e7-b0007b416f81
* Minor refactoring to make GrAutoMatrix a nested sub-class of GrContextGravatar robertphillips@google.com2012-07-11
| | | | | | | | http://codereview.appspot.com/6356092/ git-svn-id: http://skia.googlecode.com/svn/trunk@4549 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed merge error in r4545Gravatar robertphillips@google.com2012-07-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4546 2bbb7eff-a529-9590-31e7-b0007b416f81
* Forced GrClip to always have conservative boundsGravatar robertphillips@google.com2012-07-11
| | | | | | | | http://codereview.appspot.com/6353089/ git-svn-id: http://skia.googlecode.com/svn/trunk@4545 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrGLShaderBuilder produce the shader stringsGravatar bsalomon@google.com2012-07-11
| | | | | | | | Review URL: http://codereview.appspot.com/6356089/ git-svn-id: http://skia.googlecode.com/svn/trunk@4544 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable lighting filter unit test temporarily; unreviewed.Gravatar senorblanco@chromium.org2012-07-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4541 2bbb7eff-a529-9590-31e7-b0007b416f81
* This patch implements the diffuse and specular lighting filters in Ganesh. Gravatar senorblanco@chromium.org2012-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* VariableVisibility -> ShaderTypeGravatar bsalomon@google.com2012-07-11
| | | | | | | Review URL: http://codereview.appspot.com/6344103/ git-svn-id: http://skia.googlecode.com/svn/trunk@4534 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix assumption that enabled stage implies texture is presentGravatar bsalomon@google.com2012-07-11
| | | | | | | | Review URL: http://codereview.appspot.com/6353087/ git-svn-id: http://skia.googlecode.com/svn/trunk@4532 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change TextContext handling of stages and draw targets; this allows us toGravatar tomhudson@google.com2012-07-11
| | | | | | | | | | | | | assert in GrContext::setPaint() that all stages are disabled every time the paint is set. Watch for possible performance implications. http://codereview.appspot.com/6347043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4531 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added pdf implementation of conical gradient.Gravatar rileya@google.com2012-07-10
| | | | | | | Also fixed an erroneous comment in the gpu implementation. Review URL: https://codereview.appspot.com/6351076 git-svn-id: http://skia.googlecode.com/svn/trunk@4520 2bbb7eff-a529-9590-31e7-b0007b416f81
* Preserve convex control point polygon in cubic->quadratic approximationGravatar bsalomon@google.com2012-07-10
| | | | | | | | | | | | GM test modified, will require rebaselining. Review URL: http://codereview.appspot.com/6355088/ git-svn-id: http://skia.googlecode.com/svn/trunk@4518 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrStringBuilder Gravatar bsalomon@google.com2012-07-10
| | | | | | | | Review URL: http://codereview.appspot.com/6343093/ git-svn-id: http://skia.googlecode.com/svn/trunk@4514 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed Windows compiler complaintsGravatar robertphillips@google.com2012-07-10
| | | | | | | | http://codereview.appspot.com/6392044 git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
* More carefully disable stages in Ganesh to avoid textures or effectsGravatar tomhudson@google.com2012-07-10
| | | | | | | | | | leaking between draw calls. http://codereview.appspot.com/6353083/ git-svn-id: http://skia.googlecode.com/svn/trunk@4510 2bbb7eff-a529-9590-31e7-b0007b416f81
* Don't call glTexSubImage2D w/ indexed texture format on desktop GLGravatar bsalomon@google.com2012-07-10
| | | | | | | | Review URL: http://codereview.appspot.com/6374048/ git-svn-id: http://skia.googlecode.com/svn/trunk@4509 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove redundant vlayout masks and wasted vlayout bitsGravatar bsalomon@google.com2012-07-10
| | | | | | | Review URL: http://codereview.appspot.com/6345080/ git-svn-id: http://skia.googlecode.com/svn/trunk@4506 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add placement new macros to SkPostConfig, call SkNEW* from Ganesh.Gravatar tomhudson@google.com2012-07-09
| | | | | | | | | | | | 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
* Add an SK_PRINTF_LIKE macro, which declares a function to have printf-likeGravatar senorblanco@chromium.org2012-07-09
| | | | | | | | | | | | | semantics, allowing gcc and clang to check the format string against the arguments. Enable its use on SkString (printf, appendf, and prependf). Also define an SK_SIZE_T_SPECIFIER macro so there's a cross-platform way of printing a size_t. Review URL: http://codereview.appspot.com/6375043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4485 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix definition of isEqual() for two gradient effect custom stages.Gravatar tomhudson@google.com2012-07-09
| | | | | | | | | | | 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
* Left over cleanup from r4416 (fix for lingering AA clip mask bug)Gravatar robertphillips@google.com2012-07-09
| | | | | | | | http://codereview.appspot.com/6356058/ git-svn-id: http://skia.googlecode.com/svn/trunk@4474 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix bug in calling NV DeletePathsGravatar bsalomon@google.com2012-07-09
| | | | | | | | Review URL: http://codereview.appspot.com/6345078/ git-svn-id: http://skia.googlecode.com/svn/trunk@4467 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rolling back r4034 (Proposed plumbing to propagate save & restore)Gravatar robertphillips@google.com2012-07-03
| | | | | | | | http://codereview.appspot.com/6346066/ git-svn-id: http://skia.googlecode.com/svn/trunk@4456 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reworked gradient shader to no longer explicitly set gl_FragColor or return ↵Gravatar rileya@google.com2012-07-03
| | | | | | | | | | prematurely. This should fix failing linux buildbot, and should play nicer with programs that don't use the gl_FragColor global, or that have multiple stages. Also disabled debug printing from revision 4445. Review URL: https://codereview.appspot.com/6345063 git-svn-id: http://skia.googlecode.com/svn/trunk@4454 2bbb7eff-a529-9590-31e7-b0007b416f81
* Temporary checkin to debug Linux bot issue.Gravatar rileya@google.com2012-07-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4445 2bbb7eff-a529-9590-31e7-b0007b416f81
* Changed '0.5f' to '0.5' in conical gradient shader to fix problem with ↵Gravatar rileya@google.com2012-07-03
| | | | | | shader compile on Mac. git-svn-id: http://skia.googlecode.com/svn/trunk@4444 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added GPU implementation of 2-point conical gradient.Gravatar rileya@google.com2012-07-03
| | | | | | Review URL: https://codereview.appspot.com/6354062 git-svn-id: http://skia.googlecode.com/svn/trunk@4442 2bbb7eff-a529-9590-31e7-b0007b416f81