aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBitmapTextContext.h
Commit message (Collapse)AuthorAge
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* This CL cleans up the last remaining users of localCoordChange on paintGravatar joshualitt2014-12-22
| | | | | | | NOTREECHECKS=True BUG=skia: Review URL: https://codereview.chromium.org/817853002
* remove view matrix from contextGravatar joshualitt2014-12-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/808703006
* This cl moves color and coverage off of drawstate. In an effort to keep ↵Gravatar joshualitt2014-12-09
| | | | | | | | | | this CL manageable, I have left the compute invariant input / output in a bit of a strange state(fixing this will be complicated). In addition, NVPR makes this very complicated, and I haven't quite figured out a good way to handle it, so for now color and coverage DO live on optstate, but I will figure out some way to refactor that in future CLs. BUG=skia: Review URL: https://codereview.chromium.org/783763002
* Ganesh text rendering cleanup.Gravatar jvanverth2014-12-04
| | | | | | | | | Rename GrTextStrike.{cpp.h} to GrFontCache.{cpp,h} Move contents of GrTextStrike_impl.h to GrFontCache.h Move glyph uploading to a separate function and remove harmful gotos Add assert on glyph upload failure (shouldn't happen) Review URL: https://codereview.chromium.org/780923002
* Drawstate on stackGravatar joshualitt2014-11-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/732693002
* 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
* Fix color emoji.Gravatar jvanverth2014-10-10
| | | | | | | | | | | | | | | Removes the GrMaskFormat and single atlas in GrTextStrike. Replaces it by storing the GrMaskFormat in each GrGlyph, and doing a lookup for the correct atlas based on that. Disables color glyph rendering in GrDistanceFieldTextContext for now. BUG=skia:2887 Committed: https://skia.googlesource.com/skia/+/bc92163ddfe957ad6ffbb02ac40e0ba75ff82216 Review URL: https://codereview.chromium.org/636183005
* Revert of Fix color emoji. (patchset #11 id:320001 of ↵Gravatar jvanverth2014-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/636183005/) Reason for revert: Crashing the Windows bots. Original issue's description: > Fix color emoji. > > Removes the GrMaskFormat and single atlas in GrTextStrike. > Replaces it by storing the GrMaskFormat in each GrGlyph, and > doing a lookup for the correct atlas based on that. > > Disables color glyph rendering in GrDistanceFieldTextContext > for now. > > BUG=skia:2887 > > Committed: https://skia.googlesource.com/skia/+/bc92163ddfe957ad6ffbb02ac40e0ba75ff82216 TBR=robertphillips@google.com,bungeman@google.com,reed@google.com,bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2887 Review URL: https://codereview.chromium.org/640413004
* Fix color emoji.Gravatar jvanverth2014-10-10
| | | | | | | | | | | | | Removes the GrMaskFormat and single atlas in GrTextStrike. Replaces it by storing the GrMaskFormat in each GrGlyph, and doing a lookup for the correct atlas based on that. Disables color glyph rendering in GrDistanceFieldTextContext for now. BUG=skia:2887 Review URL: https://codereview.chromium.org/636183005
* Rearrange code in TextContexts to be more consistent and match style guide.Gravatar jvanverth2014-10-08
| | | | Review URL: https://codereview.chromium.org/641613003
* Revert of Revert of Fix SkTextBlob offset semantics. (patchset #1 id:1 of ↵Gravatar fmalita2014-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/609223003/) Reason for revert: Re-landing: Chromium-side fix to be landed with the roll (https://codereview.chromium.org/607853003/) Original issue's description: > Revert of Fix SkTextBlob offset semantics. (patchset #2 id:20001 of https://codereview.chromium.org/605533002/) > > Reason for revert: > Breaking the Chrome builds with the error: > > [14:54:14.317833] ../../skia/ext/pixel_ref_utils.cc:221:16: error: 'drawPosText' marked 'override' but does not override any member functions > [14:54:14.318022] virtual void drawPosText(const SkDraw& draw, > [14:54:14.318082] ^ > > Original issue's description: > > Fix SkTextBlob offset semantics. > > > > Implement proper x/y drawTextBlob() handling by plumbing a > > drawPosText() offset parameter (to act as an additional glyph pos > > translation) throughout the device layer. > > > > The new offset superceeds the existing constY, with a minor semantic > > tweak: whereas previous implementations were ignoring constY in 2D > > positioning mode (scalarsPerGlyph == 2), now the offset is always > > observed, in all positioning modes. We can do this because existing > > drawPosText() clients always pass constY == 0 for full positioning mode. > > > > R=reed@google.com, jvanverth@google.com, robertphillips@google.com > > > > Committed: https://skia.googlesource.com/skia/+/c13bc571d3e61a43b87eb97f0719abd304cafaf2 > > TBR=jvanverth@google.com,reed@google.com,bsalomon@google.com,fmalita@chromium.org > NOTREECHECKS=true > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/d46b8d2bab7cfba8458432248e1568ac377429e9 R=jvanverth@google.com, reed@google.com, bsalomon@google.com, robertphillips@google.com TBR=bsalomon@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/607413003
* Revert of Fix SkTextBlob offset semantics. (patchset #2 id:20001 of ↵Gravatar robertphillips2014-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/605533002/) Reason for revert: Breaking the Chrome builds with the error: [14:54:14.317833] ../../skia/ext/pixel_ref_utils.cc:221:16: error: 'drawPosText' marked 'override' but does not override any member functions [14:54:14.318022] virtual void drawPosText(const SkDraw& draw, [14:54:14.318082] ^ Original issue's description: > Fix SkTextBlob offset semantics. > > Implement proper x/y drawTextBlob() handling by plumbing a > drawPosText() offset parameter (to act as an additional glyph pos > translation) throughout the device layer. > > The new offset superceeds the existing constY, with a minor semantic > tweak: whereas previous implementations were ignoring constY in 2D > positioning mode (scalarsPerGlyph == 2), now the offset is always > observed, in all positioning modes. We can do this because existing > drawPosText() clients always pass constY == 0 for full positioning mode. > > R=reed@google.com, jvanverth@google.com, robertphillips@google.com > > Committed: https://skia.googlesource.com/skia/+/c13bc571d3e61a43b87eb97f0719abd304cafaf2 R=jvanverth@google.com, reed@google.com, bsalomon@google.com, fmalita@chromium.org TBR=bsalomon@google.com, fmalita@chromium.org, jvanverth@google.com, reed@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/609223003
* Fix SkTextBlob offset semantics.Gravatar Florin Malita2014-09-26
| | | | | | | | | | | | | | | | Implement proper x/y drawTextBlob() handling by plumbing a drawPosText() offset parameter (to act as an additional glyph pos translation) throughout the device layer. The new offset superceeds the existing constY, with a minor semantic tweak: whereas previous implementations were ignoring constY in 2D positioning mode (scalarsPerGlyph == 2), now the offset is always observed, in all positioning modes. We can do this because existing drawPosText() clients always pass constY == 0 for full positioning mode. R=reed@google.com, jvanverth@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/605533002
* Patch to create a distinct geometry processor. The vast majority of this patchGravatar joshualitt2014-09-23
| | | | | | | | | | | | | is just a rename. The meat is in GrGeometryProcessor, GrProcessor, GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory, GrProcessUnitTestFactory, and the builders BUG=skia: R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/582963002
* Revert Jim's CL.Gravatar Mike Klein2014-08-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/517123005
* Restore text vertex buffer alloc and other optimizations.Gravatar jvanverth2014-08-28
| | | | | | | | | | | | Modifies the fontcache GM to ensure that the font cache is forced to flush. Committed: https://skia.googlesource.com/skia/+/9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/466363009
* Revert of Restore text alloc optimizations. (patchset #4 of ↵Gravatar djsollen2014-08-27
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/466363009/) Reason for revert: GM failures on http://108.170.220.120:10115/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/builds/1867/ Original issue's description: > Restore text vertex buffer alloc and other optimizations. > > Modifies the fontcache GM to ensure that the font cache is forced to flush. > > Committed: https://skia.googlesource.com/skia/+/9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: djsollen@google.com Review URL: https://codereview.chromium.org/510103003
* Restore text vertex buffer alloc and other optimizations.Gravatar jvanverth2014-08-27
| | | | | | | | | | Modifies the fontcache GM to ensure that the font cache is forced to flush. R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/466363009
* Rollback text allocation changes.Gravatar jvanverth2014-08-01
| | | | | | | | | | | This also addresses an inadvertantly introduced distance field bug. BUG=399125 R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/438683006
* Move vertex buffer setup out of drawPackedGlyph().Gravatar jvanverth2014-07-25
| | | | | | | | | | | | This gets a very welcome ~10% speedup on my Mac. Committed: https://skia.googlesource.com/skia/+/1d38619389cc1100bd516b9acbf17b7bd42d33ce R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/414573002
* Revert of Move vertex buffer setup out of drawPackedGlyph(). ↵Gravatar jvanverth2014-07-25
| | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/414573002/) Reason for revert: Breaking Ubuntu and Windows bots. Original issue's description: > Move vertex buffer setup out of drawPackedGlyph(). > > This gets a very welcome ~10% speedup on my Mac. > > Committed: https://skia.googlesource.com/skia/+/1d38619389cc1100bd516b9acbf17b7bd42d33ce R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Author: jvanverth@google.com Review URL: https://codereview.chromium.org/419943002
* Move vertex buffer setup out of drawPackedGlyph().Gravatar jvanverth2014-07-25
| | | | | | | | | | This gets a very welcome ~10% speedup on my Mac. R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/414573002
* Revert "Revert of Use the GrCacheable ID to eliminate the need for ↵Gravatar bsalomon2014-07-22
| | | | | | | | | | | | | | notifications to GrGpuGL when textures and RTs are… (https://codereview.chromium.org/376703009/)" This reverts commit 249171e7d29b5559f3eefe9dbd437030bfad3fda. Uses 32 bit id instead of 64. Renamed instanceID to uniqueID to match existing code. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/414493002
* Revert of Use the GrCacheable ID to eliminate the need for notifications to ↵Gravatar robertphillips2014-07-20
| | | | | | | | | | | | | | | | | | | | | | | GrGpuGL when textures and RTs are… (https://codereview.chromium.org/376703009/) Reason for revert: Trying to unblock roll wedged on 64 bit intrinsic call on XP Original issue's description: > Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are deleted. > > Also, rename GrCacheable::getGenerationID() to getInstanceID() since it doesn't behave like other "generation" IDs. > > Committed: https://skia.googlesource.com/skia/+/91bdbcdbbdf5cdf0fdb4518a0d30206c964cfdf6 R=jvanverth@google.com, bsalomon@google.com TBR=bsalomon@google.com, jvanverth@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/405023003
* Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL ↵Gravatar bsalomon2014-07-17
| | | | | | | | | | | | when textures and RTs are deleted. Also, rename GrCacheable::getGenerationID() to getInstanceID() since it doesn't behave like other "generation" IDs. R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/376703009
* Goodbye GrEffectRef.Gravatar bsalomon2014-07-08
| | | | | | | | | | Also, reworked some var names and comments around SkShader::asNewEffect. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/374923002
* Rename GrAtlasMgr to GrAtlas (and other cleanup)Gravatar robertphillips2014-06-24
| | | | | | | | | | This CL also renames the old GrAtlas to ClientPlotUsage and moves it into the new GrAtlas. R=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/355673002
* Cache the GrEffect used for text rendering in GrBitmapTextContext.Gravatar bsalomon2014-06-19
| | | | | | | | R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/338093005
* Use vertex attribute for text color in GrBitmapTextContextGravatar bsalomon2014-06-06
| | | | | | | | R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/316063002
* Add CPU backing store for GrAtlas to reduce texture uploads.Gravatar commit-bot@chromium.org2014-05-14
| | | | | | | | | | | | | | | | | | This change creates a temporary copy of each GrPlot on the CPU side. As we add glyphs to a plot, a dirty rectangle is tracked, and just before we render text we upload all of the dirty areas to the atlas texture. Once a plot is nearly full, we assume that we may only be adding one or two glyphs before rendering, so we delete the CPU backing memory to save space, and upload directly. BUG=366225 R=robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/269423007 git-svn-id: http://skia.googlecode.com/svn/trunk@14729 2bbb7eff-a529-9590-31e7-b0007b416f81
* SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.hGravatar commit-bot@chromium.org2014-03-28
| | | | | | | | | | | BUG=skia: R=bsalomon@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/216503004 git-svn-id: http://skia.googlecode.com/svn/trunk@13982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Drop executable flag from headers so that they can be packagedGravatar robertphillips@google.com2014-03-11
| | | | | | | | https://codereview.chromium.org/194883004/ git-svn-id: http://skia.googlecode.com/svn/trunk@13746 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add dev bounds to bmp txt context, use bounds to ignore clipsGravatar commit-bot@chromium.org2014-02-11
| | | | | | | | | | R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/144283004 git-svn-id: http://skia.googlecode.com/svn/trunk@13413 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-01-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13258 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* Move GrTextContext to private interfaceGravatar commit-bot@chromium.org2014-01-30
NOTRY=true R=bsalomon@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/145073005 git-svn-id: http://skia.googlecode.com/svn/trunk@13239 2bbb7eff-a529-9590-31e7-b0007b416f81