aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextContext.cpp
Commit message (Collapse)AuthorAge
* Replace factory generation of TextContexts with persistent objects.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | BUG=skia:2018 R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/150743002 git-svn-id: http://skia.googlecode.com/svn/trunk@13249 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-01-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13228 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add standalone drawText for GrTextContext.Gravatar commit-bot@chromium.org2014-01-28
| | | | | | | | | | | | | | | This unifies the interface between GrBitmapTextContext and GrDistanceFieldTextContext so that they don't need special case code. The future GrNVPRTextContext will also use this interface. BUG=skia:2018 R=bsalomon@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/141863005 git-svn-id: http://skia.googlecode.com/svn/trunk@13227 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add factory class for generating various flavors of GrTextContext.Gravatar commit-bot@chromium.org2014-01-24
| | | | | | | | | | | | | | | | | | | This is the first pass of making Gr*TextContext more generic and easily subclassed. The next stage will be making GrBitmapTextContext and GrDistanceFieldTextContext more similar by moving the SkDraw loop into each subclass. BUG=skia:2018 Committed: http://code.google.com/p/skia/source/detail?r=13142 R=bsalomon@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/144283002 git-svn-id: http://skia.googlecode.com/svn/trunk@13165 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Add factory class for generating various flavors of GrTextContext. ↵Gravatar commit-bot@chromium.org2014-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/144283002/) Reason for revert: Breaks Chrome. Need to fix template issue. Original issue's description: > Add factory class for generating various flavors of GrTextContext. > > This is the first pass of making Gr*TextContext more generic and easily > subclassed. The next stage will be making GrBitmapTextContext and > GrDistanceFieldTextContext more similar by moving the SkDraw loop into > each subclass. > > BUG=skia:2018 > > Committed: http://code.google.com/p/skia/source/detail?r=13142 R=bsalomon@google.com, reed@google.com TBR=bsalomon@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2018 Author: jvanverth@google.com Review URL: https://codereview.chromium.org/145023006 git-svn-id: http://skia.googlecode.com/svn/trunk@13143 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add factory class for generating various flavors of GrTextContext.Gravatar commit-bot@chromium.org2014-01-22
| | | | | | | | | | | | | | | | This is the first pass of making Gr*TextContext more generic and easily subclassed. The next stage will be making GrBitmapTextContext and GrDistanceFieldTextContext more similar by moving the SkDraw loop into each subclass. BUG=skia:2018 R=bsalomon@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/144283002 git-svn-id: http://skia.googlecode.com/svn/trunk@13142 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11834 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split out GrBitmapTextContext from GrTextContext.Gravatar jvanverth@google.com2013-10-16
| | | | | | | | | | | This is a stepping stone to having a variety of different text context types (bitmaps, distance fields, NV path rendering). R=bsalomon@google.com Review URL: https://codereview.chromium.org/27199002 git-svn-id: http://skia.googlecode.com/svn/trunk@11820 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for blinking/corrupted text in Canvas 2D.Gravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | | | | Ensure that we update the drawToken for a glyph's plot every time it is used, not just when the glyph is first added. BUG=303803 R=junov@chromium.org, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/26253003 git-svn-id: http://skia.googlecode.com/svn/trunk@11637 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support to dump font cache texture for debug purposesGravatar commit-bot@chromium.org2013-10-02
| | | | | | | | | | R=robertphillips@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/25736002 git-svn-id: http://skia.googlecode.com/svn/trunk@11579 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a GrCustomCoordsTextureEffect classGravatar commit-bot@chromium.org2013-09-30
| | | | | | | | | | | | | | | | | | Extracts a GrCustomCoordsTextureEffect class from GrSimpleTextureEffect. This way there are no effects that can conditionally require a vertex shader. They either always need one or never do. Also removes kCustom_CoordsType from the CoordsType enum in GrEffect (that enum is really only meant for coords provided by the framework), and updates GrSimpleTextureEffect::TestCreate to make the effect with position as well, instead of just local coords. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/24018007 git-svn-id: http://skia.googlecode.com/svn/trunk@11531 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrAtlas cleanup: Split out GrPlot and GrAtlasGravatar commit-bot@chromium.org2013-09-27
| | | | | | | | | | | | This breaks up GrAtlas into the head of the list (GrAtlas) and the list elements (GrPlot). It also moves all of the GrPlot management code into GrAtlasMgr. It adds a simple pool allocator for GrPlots and removes use of GrPlotMgr. R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/24981004 git-svn-id: http://skia.googlecode.com/svn/trunk@11508 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrRefCnt.h in favor of SkRefCnt.hGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | | | | | | | | This removes GrRefCnt.h with all its tyepdefs and #defines and just switch them to the Sk* equivalents. GrSafeSetNull was promoted to SkSafeSetNull in SkRefCnt.h. BUG=None TEST=none, no functional changes. R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23904003 git-svn-id: http://skia.googlecode.com/svn/trunk@11151 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GrAssert by SkASSERT.Gravatar tfarina@chromium.org2013-08-17
| | | | | | | | R=bsalomon@google.com Review URL: https://codereview.chromium.org/22850006 git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change Atlas recycling to track current flush count and recycle if Atlas not ↵Gravatar commit-bot@chromium.org2013-08-16
| | | | | | | | | | | | | used in current flush. BUG= R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23120004 git-svn-id: http://skia.googlecode.com/svn/trunk@10777 2bbb7eff-a529-9590-31e7-b0007b416f81
* GPU Font Cache improvements:Gravatar commit-bot@chromium.org2013-08-05
| | | | | | | | | | | | | | | - If a strike has multiple atlases, check all for room for a new glyph - Mark remaining atlases unused after a purge, then check for an unused atlas before purging (reduces TextContext flushes and ghosting) - Hide Atlas management a little better inside AtlasMgr R=robertphillips@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/21594005 git-svn-id: http://skia.googlecode.com/svn/trunk@10544 2bbb7eff-a529-9590-31e7-b0007b416f81
* make the filter mode for GrTextureAccess an enum so we can plumb downGravatar humper@google.com2013-07-25
| | | | | | | | | | | the paint's filter modes to the GPU BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/20362002 git-svn-id: http://skia.googlecode.com/svn/trunk@10368 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace all instances of GrRect with SkRect.Gravatar commit-bot@chromium.org2013-07-17
| | | | | | | | | | | | And remove the typedef in GrRect.h. The same with GrIRect. R=robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/19449002 git-svn-id: http://skia.googlecode.com/svn/trunk@10130 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrPaint have a variable sized array of color and coverage stages rather ↵Gravatar commit-bot@chromium.org2013-07-13
| | | | | | | | | | | | than a fixed size. R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/18686007 git-svn-id: http://skia.googlecode.com/svn/trunk@10062 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace fixed-size array of effect stages in GrDrawState with two appendable ↵Gravatar bsalomon@google.com2013-06-13
| | | | | | | | | | arrays, one for color, one for coverage. R=robertphillips@google.com Review URL: https://codereview.chromium.org/16952006 git-svn-id: http://skia.googlecode.com/svn/trunk@9592 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make text context responsible for setting GrPaint on GrDrawState.Gravatar bsalomon@google.com2013-06-13
| | | | | | | | R=robertphillips@google.com Review URL: https://codereview.chromium.org/16928010 git-svn-id: http://skia.googlecode.com/svn/trunk@9588 2bbb7eff-a529-9590-31e7-b0007b416f81
* Vertex Attrib configurations now handled as pointers vs. SkSTArraysGravatar robertphillips@google.com2013-04-20
| | | | | | | | https://codereview.chromium.org/14328009/ git-svn-id: http://skia.googlecode.com/svn/trunk@8787 2bbb7eff-a529-9590-31e7-b0007b416f81
* Take two for r8466:Gravatar jvanverth@google.com2013-04-01
| | | | | | | | | | | | | | | Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set. Original author: bsalomon@google.com Author: jvanverth@google.com Reviewed By: bsalomon@google.com,robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/13296005 git-svn-id: http://skia.googlecode.com/svn/trunk@8468 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rolling back r8466. Gravatar jvanverth@google.com2013-04-01
| | | | | | | Not reviewed. git-svn-id: http://skia.googlecode.com/svn/trunk@8467 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revise attribute binding interface.Gravatar commit-bot@chromium.org2013-04-01
| | | | | | | | | | | | | | Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set. Original author: bsalomon@google.com Author: jvanverth@google.com Reviewed By: bsalomon@google.com,robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/13296005 git-svn-id: http://skia.googlecode.com/svn/trunk@8466 2bbb7eff-a529-9590-31e7-b0007b416f81
* Attempt to reland 8264-5 with warning-as-error fixes.Gravatar bsalomon@google.com2013-03-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8272 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 8265-8264 (broke build)Gravatar reed@google.com2013-03-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8268 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adds local coords to GrEffect system.Gravatar bsalomon@google.com2013-03-20
| | | | | | | | | | | | | Effects can ask the builder for local coords which may or may not be distinct from positions. GrEffectStage tracks changes to relationship between pos and local coords. GrGLEffectMatrix and GrSingleTextureEffect can use either pos or textures as intput coords GrSimpleTextureEffect now allows for an explicit texture coords attribute. Review URL: https://codereview.chromium.org/12531015 git-svn-id: http://skia.googlecode.com/svn/trunk@8264 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-03-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8120 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GrEllipseEdgeEffect.Gravatar commit-bot@chromium.org2013-03-12
| | | | | | | | | | Adds the effect that replaces the old oval rendering code. Also hooks in code to set attribute names and indices for effects. Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/12462008 git-svn-id: http://skia.googlecode.com/svn/trunk@8092 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove constructors from GrVertexAttrib. Gravatar jvanverth@google.com2013-03-01
| | | | | | | | | | It fits our style better to use initializer lists, so the constructors have been removed and replaced with said lists. Review URL: https://codereview.chromium.org/12379052 git-svn-id: http://skia.googlecode.com/svn/trunk@7936 2bbb7eff-a529-9590-31e7-b0007b416f81
* Resubmit r7899 and r7901.Gravatar jvanverth@google.com2013-03-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7929 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r7901 & r7899 to allow DEPS rollGravatar robertphillips@google.com2013-02-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7909 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add new vertex attribute array specification.Gravatar jvanverth@google.com2013-02-28
| | | | | | | | | | | | This changes the old method of setting vertex layout to a new one where we specify vertex attribute data separately from attribute bindings (i.e. program functionality). Attribute data is now set up via an array of generic attribute types and offsets, and this is mapped to the old program functionality by setting specific attribute indices. This allows us to create more general inputs to shaders. git-svn-id: http://skia.googlecode.com/svn/trunk@7899 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unused texture coordinate flags.Gravatar jvanverth@google.com2013-02-14
| | | | | | | | | | | Currently we support 5 texture stages, each with 5 possible texture coordinate attributes. However, we only ever use one explicit texture coordinate. This change removes all but one (now named just "aTexCoord") of the possible explicit texture coordinates. Review URL: https://codereview.appspot.com/7308094/ git-svn-id: http://skia.googlecode.com/svn/trunk@7737 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove compile time option to use different types for text vertices.Gravatar bsalomon@google.com2013-02-07
| | | | | | Review URL: https://codereview.appspot.com/7309060 git-svn-id: http://skia.googlecode.com/svn/trunk@7658 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-02-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7608 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix bench crash (calling method on NULL object).Gravatar bsalomon@google.com2013-02-05
| | | | | | Review URL: https://codereview.appspot.com/7305048 git-svn-id: http://skia.googlecode.com/svn/trunk@7603 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move vertex layout from GeometrySrcState to GrDrawState.Gravatar jvanverth@google.com2013-02-05
| | | | | | | | | | | Also adds AutoStateRestore member to AutoGeometryPush to push DrawState as well as GeometrySrcState. And removed vertex layout as an argument to a number of functions -- they will get vertex layout info from the current DrawState. Review URL: https://codereview.appspot.com/7286047 git-svn-id: http://skia.googlecode.com/svn/trunk@7600 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change vertex buffer allocator functions to take size rather than layout, ↵Gravatar jvanverth@google.com2013-01-31
| | | | | | | | | | | take two. Resubmission of r7498. https://codereview.appspot.com/7228078 git-svn-id: http://skia.googlecode.com/svn/trunk@7501 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7499 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change vertex buffer allocator functions to take size rather than layout.Gravatar jvanverth@google.com2013-01-31
| | | | | | | https://codereview.appspot.com/7228078 git-svn-id: http://skia.googlecode.com/svn/trunk@7498 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move vertex layout definitions from GrDrawTarget to GrDrawState.Gravatar jvanverth@google.com2013-01-28
| | | | | | | | | | This is the first step in revising vertex layouts so that the currently installed GrEffects determine the current vertex layout. https://codereview.appspot.com/7235051/ git-svn-id: http://skia.googlecode.com/svn/trunk@7423 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove getter of writable GrEffectStage from GrDrawState.Gravatar bsalomon@google.com2013-01-28
| | | | | | | 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
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Follow up on the previous patch :Gravatar sugoi@google.com2012-12-17
| | | | | | | | | | | | | | | - 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
* As part of preliminary groundwork for a chromium fix, this changelist is ↵Gravatar sugoi@google.com2012-12-06
| | | | | | | | | | 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
* Replace GrMatrix with SkMatrix.Gravatar bsalomon@google.com2012-11-01
| | | | | | Review URL: https://codereview.appspot.com/6814067 git-svn-id: http://skia.googlecode.com/svn/trunk@6247 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrScalar, replace with SkScalar.Gravatar bsalomon@google.com2012-11-01
| | | | | | Review URL: https://codereview.appspot.com/6812064 git-svn-id: http://skia.googlecode.com/svn/trunk@6243 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename GrSamplerState to GrEffectStage.Gravatar bsalomon@google.com2012-10-26
| | | | | | | 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