aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextContext.cpp
Commit message (Collapse)AuthorAge
* Dynamically allocate the GrDrawContextsGravatar robertphillips2015-10-06
| | | | | | This CL moves the allocation and storage of the GrTextContexts into the DrawingManager. The GrDrawContexts now just get their GrTextContext from the DrawingManager. Review URL: https://codereview.chromium.org/1375153007
* Make skpaint->grpaint flow work for composing draws (verts and atlas)Gravatar bsalomon2015-09-28
| | | | | | One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color. Review URL: https://codereview.chromium.org/1348583002
* Stop supporting HW ditherGravatar bsalomon2015-09-22
| | | | Review URL: https://codereview.chromium.org/1359833004
* On gpu, use max(r,g,b) for coverage alpha in LCD and update lcd blend gm.Gravatar egdaniel2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1339213004
* Add support for blending of LCD for all blend modes.Gravatar egdaniel2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1313623002
* Make GrTextContext no longer store a GrDrawContextGravatar robertphillips2015-09-01
| | | | | | This, at least, makes GrTextContexts no longer bound to a single GrDrawContext. (Passing in a RenderTarget and praying it matched the DrawContext was always a bit fishy too). Review URL: https://codereview.chromium.org/1320323004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Remove init function from GrTextContext.hGravatar joshualitt2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1231923002
* Propagate SkSurfaceProps when knownGravatar robertphillips2015-07-07
| | | | | | This CL just closes the loop on some low hanging fruit w.r.t. propagating surface properties. Review URL: https://codereview.chromium.org/1214853025
* remove SkDevicePropertiesGravatar robertphillips2015-06-19
| | | | | | There is a lot more clean up to do here but this is probably a big enough bite. Review URL: https://codereview.chromium.org/1196683003
* Make GrTextContext be owned by the GrDrawContextGravatar robertphillips2015-06-17
| | | | | | | | | | | | | | This CL makes the GrTextContext be owned (and hidden) by the GrDrawContext. This funnels all the drawText* calls through the GrDrawContext and hides the (dispreferred) GrPipelineBuilder drawText variant. Some consequences of this are: GrDrawContext now has to get the text drawing settings (i.e., SkDeviceProperties & useDFT). This means that we need a separate GrDrawContext for each combination of pixel geometry and DFT-use. All the GrTextContext-derived classes now get a back pointer to the originating GrDrawContext so their method calls no longer take one. Committed: https://skia.googlesource.com/skia/+/5b16e740fe6ab6d679083d06f07651602265081b Review URL: https://codereview.chromium.org/1175553002
* Revert of Make GrTextContext be owned by the GrDrawContext (patchset #7 ↵Gravatar bsalomon2015-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:120001 of https://codereview.chromium.org/1175553002/) Reason for revert: Breaking Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug ? https://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/436/steps/dm/logs/stdio Original issue's description: > Make GrTextContext be owned by the GrDrawContext > > This CL makes the GrTextContext be owned (and hidden) by the GrDrawContext. This funnels all the drawText* calls through the GrDrawContext and hides the (dispreferred) GrPipelineBuilder drawText variant. > > Some consequences of this are: > > GrDrawContext now has to get the text drawing settings (i.e., SkDeviceProperties & useDFT). This means that we need a separate GrDrawContext for each combination of pixel geometry and DFT-use. > > All the GrTextContext-derived classes now get a back pointer to the originating GrDrawContext so their method calls no longer take one. > > Committed: https://skia.googlesource.com/skia/+/5b16e740fe6ab6d679083d06f07651602265081b TBR=joshualitt@chromium.org,joshualitt@google.com,jvanverth@google.com,reed@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1178383003
* Make GrTextContext be owned by the GrDrawContextGravatar robertphillips2015-06-16
| | | | | | | | | | | | This CL makes the GrTextContext be owned (and hidden) by the GrDrawContext. This funnels all the drawText* calls through the GrDrawContext and hides the (dispreferred) GrPipelineBuilder drawText variant. Some consequences of this are: GrDrawContext now has to get the text drawing settings (i.e., SkDeviceProperties & useDFT). This means that we need a separate GrDrawContext for each combination of pixel geometry and DFT-use. All the GrTextContext-derived classes now get a back pointer to the originating GrDrawContext so their method calls no longer take one. Review URL: https://codereview.chromium.org/1175553002
* Break GrTextContext's reliance on SkGpuDeviceGravatar robertphillips2015-05-28
| | | | | | | | | | | This CL seems to have 2 main downsides: 1) It duplicates some code in SkBaseDevice::filterTextFlags 2) It makes it tougher to derive from SkGpuDevice It seems reasonable (at least to me) that the TextContexts get the power to reset the LCD flags. Review URL: https://codereview.chromium.org/1159973002
* Move SkGpuDevice::internalDrawPath to GrBlurUtils::drawPathWithMaskFilterGravatar robertphillips2015-05-27
| | | | | | | | | | | This CL is ugly but it: removes the stored SkGpuDevice back pointer from GrTextContext (at the cost of passing more parameters) moves SkGpuDevice::internalDrawPath to GrDrawContext::drawPathFull Unfortunately, the GrTextContext-derived classes still need the SkGpuDevice for filterTextFlags calls but I will try removing that in a separate CL. Review URL: https://codereview.chromium.org/1157773003
* Split drawing functionality out of GrContext and into new GrDrawContextGravatar robertphillips2015-05-26
| | | | | | | | This is mainly a mechanical CL. There were some fiddly bits in GrContext.cpp where it no longer had access to the GrDrawTarget (and had to use the new GrDrawContext). I've converted GrAARectRenderer & GrOvalRenderer into static classes so I could stop allocating them. Review URL: https://codereview.chromium.org/1151283004
* Add unit tests to text contextGravatar joshualitt2015-05-11
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1128153005
* Don't draw if SkShader::asNewFragmentProcessor fails.Gravatar bsalomon2015-04-15
| | | | | | BUG=chromium:473156 Review URL: https://codereview.chromium.org/1089063002
* Add more parameters to GrTextContext::canDrawGravatar cdalton2015-03-25
| | | | | | | | | | | | | Updates canDraw to accept all the same Skia/Gr objects as the drawText functions, since that information may very well be relevant in determining whether a context can draw. Also moves the onDrawTextBlob implementation directly into drawTextBlob. BUG=skia: Review URL: https://codereview.chromium.org/1010113004
* Initial change to move text blob to GrTextContextGravatar joshualitt2015-03-23
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1019633002
* Let text contexts fall back directly to pathsGravatar joshualitt2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1015173002
* adding preabandon flag to DMGravatar joshualitt2015-02-25
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/929243004
* I'd really like to land this before the branch so speedy reviews are ↵Gravatar joshualitt2015-02-25
| | | | | | | | | | appreciated. BUG=skia: Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336 Review URL: https://codereview.chromium.org/936943002
* Revert of Pass clip to context (patchset #8 id:180001 of ↵Gravatar joshualitt2015-02-25
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/936943002/) Reason for revert: Strange blur problems on nexus 5 Original issue's description: > I'd really like to land this before the branch so speedy reviews are appreciated. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336 TBR=jvanverth@google.com,senorblanco@google.com,bsalomon@google.com,senorblanco@chromium.org,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/956083002
* I'd really like to land this before the branch so speedy reviews are ↵Gravatar joshualitt2015-02-25
| | | | | | | | appreciated. BUG=skia: Review URL: https://codereview.chromium.org/936943002
* Move clip off of draw targetGravatar joshualitt2015-02-23
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/947443003
* Pass Rendertarget into context.Gravatar joshualitt2015-02-18
| | | | | | | | Adding Jim for text context stuff, and Steven for image blur stuff. BUG=skia: Review URL: https://codereview.chromium.org/939623005
* Clean up clipping code a bitGravatar robertphillips2015-02-10
| | | | Review URL: https://codereview.chromium.org/913693002
* remove view matrix from contextGravatar joshualitt2014-12-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/808703006
* Allocate only the vertices we need for text.Gravatar jvanverth2014-10-23
| | | | | | | | | | This restructures the vertex allocation for text rendering to compute the max number of vertices we would need for a line of text, and then only allocate that much. If this number exceeds the quad index limit, then it will allocate for the max number of quads, and reallocate for the rest later. Review URL: https://codereview.chromium.org/663423003
* Revert of Change drawText() to generate positions and send to drawPosText() ↵Gravatar jvanverth2014-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #4 id:60001 of https://codereview.chromium.org/653133004/) Reason for revert: A large number of GMs on Ubuntu12 are failing. The text layout on GPU is visibly different than that for 8888. Original issue's description: > Change drawText() to generate positions and send to drawPosText() > > The idea here is to have a central place that does layout for drawText(), and > then always feed text through drawPosText(). This both makes all of the > GrTextContexts consistent in drawText() output, and does a better job of > stressing drawPosText(). > > Because of the effect of matrices on hinting and approximation error, the > generated text is not 100% identical to that produced by the raster pipeline. > > BUG=skia:2778 > > Committed: https://skia.googlesource.com/skia/+/7851a56895c9c076f73a835a7dd51d3c6180c16f TBR=cdalton.nvidia@gmail.com,bungeman@google.com,reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2778 Review URL: https://codereview.chromium.org/659993003
* Change drawText() to generate positions and send to drawPosText()Gravatar jvanverth2014-10-16
| | | | | | | | | | | | | | The idea here is to have a central place that does layout for drawText(), and then always feed text through drawPosText(). This both makes all of the GrTextContexts consistent in drawText() output, and does a better job of stressing drawPosText(). Because of the effect of matrices on hinting and approximation error, the generated text is not 100% identical to that produced by the raster pipeline. BUG=skia:2778 Review URL: https://codereview.chromium.org/653133004
* Change GrTextContext fallbacks to be a linked list chain.Gravatar jvanverth2014-10-14
| | | | | | | | | Preliminary work for getting color emoji working with distance field text. BUG=skia:2887 Review URL: https://codereview.chromium.org/650273003
* Refactor SkGrFontScaler and SkGrFontKey into non-virtual versions.Gravatar jvanverth2014-07-11
| | | | | | | | | | | | | This is a pre-cleanup for another change, but has the side benefit of making the code simpler in general. No perf increase, despite removing virtual functions. R=bsalomon@google.com, egdaniel@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/385263002
* 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