aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAtlas.cpp
Commit message (Collapse)AuthorAge
* Clean up GrAtlas and rename it GrLayerAtlasGravatar robertphillips2015-11-03
| | | | Review URL: https://codereview.chromium.org/1412243013
* 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
* small cleanup of GrAtlasGravatar joshualitt2015-05-19
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/d706f11b6e3f4398ab93b23458a7599ee324be2c Review URL: https://codereview.chromium.org/1142263002
* Revert of small cleanup of GrAtlas (patchset #2 id:20001 of ↵Gravatar bungeman2015-05-19
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1142263002/) Reason for revert: Broke compile on Linux Original issue's description: > small cleanup of GrAtlas > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/d706f11b6e3f4398ab93b23458a7599ee324be2c TBR=robertphillips@google.com,joshualitt@google.com,jvanverth@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1142273002
* small cleanup of GrAtlasGravatar joshualitt2015-05-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1142263002
* Revert of BitmapTextBatch and BitmapTextBlob (patchset #18 id:360001 of ↵Gravatar joshualitt2015-03-31
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1011403004/) Reason for revert: Breaks a unit test on mac Original issue's description: > BitmapTextBatch and BitmapTextBlob > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984 TBR=fmalita@chromium.org,reed@google.com,jvanverth@google.com,robertphillips@google.com,bsalomon@google.com,jvanverth@chromium.org,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1050633002
* BitmapTextBatch and BitmapTextBlobGravatar joshualitt2015-03-31
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1011403004
* Make uncached textures uncached from the get go.Gravatar bsalomon2015-01-14
| | | | | | | | This avoids the problem of a newly created uncached texture causing a purge of cached resources. BUG=chromium:445885 Review URL: https://codereview.chromium.org/846303002
* Cleanup: Go with SkDebugf instead of GrPrintf.Gravatar tfarina2014-10-31
| | | | | | | | | | | Since GrPrintf is just defined to SkDebugf, we can go with the later directly. BUG=None TEST=None R=bsalomon@google.com Review URL: https://codereview.chromium.org/695663003
* rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlagsGravatar bsalomon2014-10-28
| | | | Review URL: https://codereview.chromium.org/682223002
* Devirtualize read/write pixels on surface.Gravatar bsalomon2014-10-13
| | | | | | | | Consolidate read/write funcs in context. Remove support for reading pixels from a surface that's not a target. It's currently broken and neither used nor tested. Review URL: https://codereview.chromium.org/648863002
* 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
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Add unique ID to GrPlotGravatar robertphillips2014-07-16
| | | | | | | | | | This is calved off of (Add atlased layer purging - https://codereview.chromium.org/367073002/) where it is used for plot lifetime management (i.e., tracking which plots are locked). R=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/391153002
* Make GrAtlas::removePlot staticGravatar robertphillips2014-07-13
| | | | | | | | | | | This CL just calves off a small chunk of (Add atlased layer purging - https://codereview.chromium.org/367073002/). R=jvanverth@google.com TBR=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/388103002
* Begin atlasingGravatar robertphillips2014-06-30
| | | | | | | | | | | | | | | | | | | This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): 1) the atlased layers cannot be purged nor aged out 2) the texture backing the atlas is not pulled from (or returned to) the resource cache #1 is on hold until we have a recycling rectanizer A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354533004
* Revert of Begin atlasing (https://codereview.chromium.org/354533004/)Gravatar robertphillips2014-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: Sigh Original issue's description: > Begin atlasing > > This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): > > 1) the atlased layers cannot be purged nor aged out > 2) the texture backing the atlas is not pulled from (or returned to) the resource cache > > #1 is on hold until we have a recycling rectanizer > > A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. > > Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/359953002
* Begin atlasingGravatar robertphillips2014-06-29
| | | | | | | | | | | | | | | | | This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): 1) the atlased layers cannot be purged nor aged out 2) the texture backing the atlas is not pulled from (or returned to) the resource cache #1 is on hold until we have a recycling rectanizer A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354533004
* 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
* Reduce texture uploads for font atlas.Gravatar jvanverth2014-06-19
| | | | | | | | | | Also adds upload tracing for Chrome. R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/347563005
* Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h)Gravatar robertphillips2014-06-02
| | | | | | | | R=bsalomon@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/309683002
* Move the LATC and ETC1 enum values to GrPixelConfig. I also tried to put in ↵Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | checks in a few places to make sure that we weren't using these pixel configurations in places that we shouldn't be. LATC is a DXT-esque alpha compression format that goes by a few other names (RGTC, 3DC). It might be useful to investigate using it to compress the alpha masks that we get from software rasterization. This patch set adds enums for that and recognition whether or not the device can support it. R=bsalomon@google.com, robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/304743004 git-svn-id: http://skia.googlecode.com/svn/trunk@14991 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-05-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14744 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-04-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14021 2bbb7eff-a529-9590-31e7-b0007b416f81
* Minor changes to GrFontCache system.Gravatar commit-bot@chromium.org2014-04-01
| | | | | | | | | | | | The main change is parameterizing the GrAtlasMgr so it can have a different sized backing texture and a different number of plots. This is in support of the saveLayer cache which has a smaller backing texture and only one plot. R=jvanverth@google.com, bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/217423014 git-svn-id: http://skia.googlecode.com/svn/trunk@14011 2bbb7eff-a529-9590-31e7-b0007b416f81
* Distance field fixes for AndroidGravatar commit-bot@chromium.org2014-03-26
| | | | | | | | | | | | | | | | | | | | - Expand glyph size by 2 on each side to compensate for bilerp lookup - Correct for Adreno tendency to drop entire tile if any pixel has divide-by-0 - Fix blurriness on Adreno by using uv coords to compute gradient instead of st coords - Add faster version for uniform scale BUG=skia:2173 Committed: http://code.google.com/p/skia/source/detail?r=13955 R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/205343008 git-svn-id: http://skia.googlecode.com/svn/trunk@13958 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Distance field fixes for Android ↵Gravatar commit-bot@chromium.org2014-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/205343008/) Reason for revert: compile error at line 110 in GrDistanceFieldTextureEffect.cpp Original issue's description: > Distance field fixes for Android > - Expand glyph size by 2 on each side to compensate for bilerp lookup > - Correct for Adreno tendency to drop entire tile if any pixel has divide-by-0 > - Fix blurriness on Adreno by using uv coords to compute gradient instead > of st coords > - Add faster version for uniform scale > > BUG=skia:2173 > > Committed: http://code.google.com/p/skia/source/detail?r=13955 R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2173 Author: jvanverth@google.com Review URL: https://codereview.chromium.org/212953008 git-svn-id: http://skia.googlecode.com/svn/trunk@13956 2bbb7eff-a529-9590-31e7-b0007b416f81
* Distance field fixes for AndroidGravatar commit-bot@chromium.org2014-03-26
| | | | | | | | | | | | | | | | | - Expand glyph size by 2 on each side to compensate for bilerp lookup - Correct for Adreno tendency to drop entire tile if any pixel has divide-by-0 - Fix blurriness on Adreno by using uv coords to compute gradient instead of st coords - Add faster version for uniform scale BUG=skia:2173 R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/205343008 git-svn-id: http://skia.googlecode.com/svn/trunk@13955 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unused zero_fill() in GrAtlas.cppGravatar fmalita@google.com2014-03-12
| | | | | | | | | | Triggers warnings with some local clang builds. R=jvanverth@google.com Review URL: https://codereview.chromium.org/197663003 git-svn-id: http://skia.googlecode.com/svn/trunk@13773 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-03-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13651 2bbb7eff-a529-9590-31e7-b0007b416f81
* New approach for GPU font atlasGravatar commit-bot@chromium.org2014-03-03
| | | | | | | | | | | | | In the previous code, each GrTextStrike had exclusive access to one or more GrPlots in the texture atlas. This led to poor packing when only a few glyphs were used. This change allows GrTextStrikes to share GrPlots, thereby getting much better utilization of the entire texture. BUG=skia:2224 R=robertphillips@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/177463003 git-svn-id: http://skia.googlecode.com/svn/trunk@13636 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improved distance field samplingGravatar commit-bot@chromium.org2014-02-14
| | | | | | | | | | | | There are two different fixes here. First, it computes the distance value properly within the shader. Second, it handles anti-aliasing properly by doing a correction based on the gradient of the texture coordinates. R=bsalomon@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/149853002 git-svn-id: http://skia.googlecode.com/svn/trunk@13461 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove border from GrAtlas entries, and associated copy.Gravatar commit-bot@chromium.org2014-02-14
| | | | | | | | | | | BUG=skia:2178 R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/166483005 git-svn-id: http://skia.googlecode.com/svn/trunk@13458 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for reading non-rendertarget textures.Gravatar commit-bot@chromium.org2013-10-23
| | | | | | | | | | | | | Also removes rendertarget flag from GrAtlas texture creation (no longer needed) and re-enables GrFontCache::dump(). R=robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/29263004 git-svn-id: http://skia.googlecode.com/svn/trunk@11917 2bbb7eff-a529-9590-31e7-b0007b416f81
* Second wave of Win64 warning cleanupGravatar robertphillips@google.com2013-10-15
| | | | | | | | https://codereview.chromium.org/27343002/ git-svn-id: http://skia.googlecode.com/svn/trunk@11778 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix font GMsGravatar jvanverth@google.com2013-10-02
| | | | | | | | | | Disables font cache dump for now R=robertphillips@google.com Review URL: https://codereview.chromium.org/25605007 git-svn-id: http://skia.googlecode.com/svn/trunk@11584 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 new skyline RectanizerGravatar commit-bot@chromium.org2013-10-02
| | | | | | | | | | | | | | | | | | | The skyline Rectanizer tracks the leading silhouette of the currently packed rects and tries to fit the next rectangle on top of that. This gives slightly better packing behavior than the current log2 scheme. Also shrank the size of the plots, which increases their number from 18 to 32 and gives better cache behavior (fewer purges and uploads). R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/25584002 git-svn-id: http://skia.googlecode.com/svn/trunk@11577 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11513 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
* move GrMalloc, GrFree, Gr_bzero to their sk equivalentsGravatar reed@google.com2013-09-26
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/23566022 git-svn-id: http://skia.googlecode.com/svn/trunk@11486 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrAtlas refactor: Replace GrMaskFormat usage in GrAtlas with GrPixelConfig.Gravatar commit-bot@chromium.org2013-09-26
| | | | | | | | | | | | | This gets the font-specific GrMaskFormat out of GrAtlas and replaces it with more generic configs, allowing GrAtlas to be used for other things. R=robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/24751003 git-svn-id: http://skia.googlecode.com/svn/trunk@11474 2bbb7eff-a529-9590-31e7-b0007b416f81
* First pass at font cache refactor: Create an atlas manager per textureGravatar commit-bot@chromium.org2013-09-26
| | | | | | | | | | | | | | This changes the AtlasMgr from a singleton class to one that is created per-texture. This is the first step in allowing us to create Atlases of other types (e.g., combine small icons into one big texture). R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/24608002 git-svn-id: http://skia.googlecode.com/svn/trunk@11468 2bbb7eff-a529-9590-31e7-b0007b416f81
* Have multiple plotmgrs, one for each mask format.Gravatar jvanverth@google.com2013-09-16
| | | | | | | | | | Only flush/purge those strikes that match our format. R=bsalomon@google.com Review URL: https://codereview.chromium.org/24047005 git-svn-id: http://skia.googlecode.com/svn/trunk@11303 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 GR_DEBUG by SK_DEBUG.Gravatar commit-bot@chromium.org2013-08-28
| | | | | | | | | | | BUG=None R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23137022 git-svn-id: http://skia.googlecode.com/svn/trunk@10978 2bbb7eff-a529-9590-31e7-b0007b416f81
* My clang now doesn't complain about !"foo".Gravatar mtklein@google.com2013-08-22
| | | | | | | | | BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/22875037 git-svn-id: http://skia.googlecode.com/svn/trunk@10874 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