aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
Commit message (Collapse)AuthorAge
* Cleanup: More override fixes.Gravatar tfarina2014-12-17
| | | | | | | | | | | | | | | | Fixes errors like: ../../src/gpu/GrGeometryProcessor.h:172:25: error: 'name' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] virtual const char* name() const = 0; ^ ../../include/gpu/GrProcessor.h:66:25: note: overridden virtual function is here virtual const char* name() const = 0; BUG=skia:3075 TEST=ninja -C out/Debug skia_lib TBR=mtklein@google.com Review URL: https://codereview.chromium.org/789343003
* remove view matrix from contextGravatar joshualitt2014-12-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/808703006
* Stop creating GrODS for stencilPath commands.Gravatar bsalomon2014-12-17
| | | | Review URL: https://codereview.chromium.org/816513003
* Add Coverage Drawing XPGravatar egdaniel2014-12-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/808813002
* Re-enable default sized formats, handling BGRA exception.Gravatar jvanverth2014-12-17
| | | | | | | | Sized texture formats are accepted by OpenGL desktop and ES 3.0, except when using BGRA with GL_EXT_texture_format_BGRA8888. In that case we fall back to using the unsized format. Review URL: https://codereview.chromium.org/811133002
* Stop calling flushGLState in onStencilPathGravatar bsalomon2014-12-17
| | | | Review URL: https://codereview.chromium.org/805293003
* Give the hoisting surfaces surface propsGravatar robertphillips2014-12-16
| | | | | | This mimics how layers are set up in SkGpuDevice::onCreateCompatibleDevice Review URL: https://codereview.chromium.org/809823003
* Revert using sized formats for everything except ES 2.0.Gravatar jvanverth2014-12-16
| | | | | | Temporary fix for WritePixels test on Nexus 5/Nexus 7-2013. Review URL: https://codereview.chromium.org/794273005
* Remove GrGpu::flushGraphicsStateGravatar bsalomon2014-12-16
| | | | Review URL: https://codereview.chromium.org/809843002
* Change desktop and ES 3.0 to always use sized internal texture formats.Gravatar jvanverth2014-12-16
| | | | | | Committed: https://skia.googlesource.com/skia/+/bc02bf0ee4221604796cd6d0394ca3af60c0a579 Review URL: https://codereview.chromium.org/806943002
* Fix layer hoisting image filter corner casesGravatar robertphillips2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL fixes 5 bugs related to hoisting image filters: For image filters the src layer (the one prior to filtering) often needs to be smaller then the final layer. This requires the saveLayer's optional bounds to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in compute_source_rect and carried around in GrCachedLayer. The image filters can add an extra offset to the final draw operation. This is now computed in GrLayerHoister::FilterLayer and carried around in GrCachedLayer. Filtered layers must use exact matches. This is now done in GrLayerCache::lock. The filter cache requires a valid matrix so it can compute the correct offset. This is now done in GrLayerHoister::FilterLayer. Filtered layers need to be drawn with drawSprite while unfiltered (and therefore hopefully atlased) layers can be drawn with drawBitmap. This is now done in draw_replacement_bitmap. Committed: https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3 Review URL: https://codereview.chromium.org/803183003
* Rename GrGpuGL_program.cpp to GrGLGpuProgramCache.cppGravatar bsalomon2014-12-16
| | | | Review URL: https://codereview.chromium.org/807133002
* Revert of Fix layer hoisting image filter corner cases (patchset #3 id:40001 ↵Gravatar robertphillips2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/803183003/) Reason for revert: Breaking DM Original issue's description: > Fix layer hoisting image filter corner cases > > This CL fixes 5 bugs related to hoisting image filters: > > For image filters the src layer (the one prior to filtering) often needs to be > smaller then the final layer. This requires the saveLayer's optional bounds > to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in > compute_source_rect and carried around in GrCachedLayer. > > The image filters can add an extra offset to the final draw operation. > This is now computed in GrLayerHoister::FilterLayer and carried around in > GrCachedLayer. > > Filtered layers must use exact matches. This is now done in GrLayerCache::lock. > > The filter cache requires a valid matrix so it can compute the correct offset. > This is now done in GrLayerHoister::FilterLayer. > > Filtered layers need to be drawn with drawSprite while unfiltered (and therefore > hopefully atlased) layers can be drawn with drawBitmap. This is now done in > draw_replacement_bitmap. > > Committed: https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3 TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/790643009
* Rename GrGpuGL to GrGLGpu for consistencyGravatar bsalomon2014-12-16
| | | | Review URL: https://codereview.chromium.org/808593003
* Fix layer hoisting image filter corner casesGravatar robertphillips2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | This CL fixes 5 bugs related to hoisting image filters: For image filters the src layer (the one prior to filtering) often needs to be smaller then the final layer. This requires the saveLayer's optional bounds to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in compute_source_rect and carried around in GrCachedLayer. The image filters can add an extra offset to the final draw operation. This is now computed in GrLayerHoister::FilterLayer and carried around in GrCachedLayer. Filtered layers must use exact matches. This is now done in GrLayerCache::lock. The filter cache requires a valid matrix so it can compute the correct offset. This is now done in GrLayerHoister::FilterLayer. Filtered layers need to be drawn with drawSprite while unfiltered (and therefore hopefully atlased) layers can be drawn with drawBitmap. This is now done in draw_replacement_bitmap. Review URL: https://codereview.chromium.org/803183003
* Revert of Change desktop and ES 3.0 to always use sized internal texture ↵Gravatar jvanverth2014-12-16
| | | | | | | | | | | | | | | | | | formats. (patchset #2 id:20001 of https://codereview.chromium.org/806943002/) Reason for revert: Failing GMs on Mac, Windows and Ubuntu12. Original issue's description: > Change desktop and ES 3.0 to always use sized internal texture formats. > > Committed: https://skia.googlesource.com/skia/+/bc02bf0ee4221604796cd6d0394ca3af60c0a579 TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/805193003
* Change desktop and ES 3.0 to always use sized internal texture formats.Gravatar jvanverth2014-12-16
| | | | Review URL: https://codereview.chromium.org/806943002
* whitespace change to context to force rebuild of skiaGravatar joshualitt2014-12-15
| | | | | | | | | NOTREECHECKS=True NOTRY=True TBR= BUG=skia: Review URL: https://codereview.chromium.org/807663002
* This change will ultimately pull uniform color, and to a much lesser degree ↵Gravatar joshualitt2014-12-15
| | | | | | | | uniform coverage, into GPs. There are still some loose ends because drawstate has the ability to override the GP, but fixing these cleanly will have to wait until we have deferred geometry in place and can make attribute / uniform decisions on the fly. BUG=skia: Review URL: https://codereview.chromium.org/746423007
* Move all non-program cache functions out of GrGpuGL_program.cppGravatar bsalomon2014-12-15
| | | | Review URL: https://codereview.chromium.org/794343006
* devirtualize some functions on GrGpuGravatar bsalomon2014-12-15
| | | | Review URL: https://codereview.chromium.org/811483003
* Add xp optimization for RGB coverage.Gravatar egdaniel2014-12-15
| | | | | | | | | | | | | This is needed since clearColorStages is being changed to ignore color input. For RGB coverage, we want to clear all the color stages (since we know the final output color), but we don't want to ignore the color input since it is needed. In future we will change this so the XP stores the color internally and thus can tell the GP to simiply ignore color. BUG=skia: Review URL: https://codereview.chromium.org/791933006
* Add SK_OVERRIDE to a few places that are missing it.Gravatar mtklein2014-12-15
| | | | | | | | | | This was done automatically by running clang-modernize -add-override -override-macros. It's not clear to me whether include/ is already clean or I just can't get the tool to work for headers. BUG=skia: Review URL: https://codereview.chromium.org/808463002
* Do circle anti-aliasing in normalized space to avoid precision issues with ↵Gravatar bsalomon2014-12-15
| | | | | | half-floats on Adreno. Review URL: https://codereview.chromium.org/761593006
* Cleanup: Mark some overridden methods with 'SK_OVERRIDE'.Gravatar tfarina2014-12-14
| | | | | | | | | | | | | | This fixes errors like this: ../../include/gpu/effects/GrPorterDuffXferProcessor.h:27:25: error: 'name' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] BUG=skia:3075 TEST=ninja -C out/Debug skia_lib TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/804813002
* DM warning-free on win64Gravatar bsalomon2014-12-12
| | | | Review URL: https://codereview.chromium.org/805543002
* Even more win64 warning fixesGravatar bsalomon2014-12-12
| | | | Review URL: https://codereview.chromium.org/800993002
* Extract cubic classification from gpu into geometryGravatar caryclark2014-12-12
| | | | | | | Move code from the GPU path utilities into geometry so that path ops can share. Review URL: https://codereview.chromium.org/787763007
* More win64 warning fixesGravatar bsalomon2014-12-12
| | | | Review URL: https://codereview.chromium.org/798723002
* SkRecord: increase min block to 512B, remove max.Gravatar mtklein2014-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we added the 64K allocation cap, the bots showed we took a perf hit on some large .skps like desk_pokemonwiki.skp, despite not seeing a local effect. I'm still not seeing that locally, but I'd like to try removing the cap on the bots to see what happens. For big monolithic pictures, really packing into memory tightly is probably not as important as it is for tiny ones. Similarly, we're probably being too cautious about making tiny allocations. Today we start at 16 bytes, which isn't really enough to record anything. Even the smallest picture, say, save clipRect drawRect restore requires ~200 bytes, so we might as well move our minimum block size up near there. I don't know if 16 bytes is too small to start for GrTextStrikes, so I've left the behavior the same (though the max is still gone). Local recording performance is neutral-to-positive: tabl_deviantart.skp 126us -> 129us 1.02x tabl_nytimes.skp 110us -> 112us 1.02x tabl_cuteoverload.skp 521us -> 530us 1.02x desk_mobilenews.skp 673us -> 682us 1.01x desk_chalkboard.skp 843us -> 854us 1.01x desk_sfgate.skp 528us -> 535us 1.01x desk_silkfinance.skp 68.2us -> 69us 1.01x desk_youtube.skp 623us -> 629us 1.01x desk_blogger.skp 472us -> 475us 1.01x desk_jsfiddlehumperclip.skp 42.2us -> 42.5us 1.01x desk_espn.skp 255us -> 256us 1.01x desk_ebay.skp 174us -> 174us 1x desk_twitter.skp 454us -> 455us 1x tabl_pravda.skp 200us -> 201us 1x desk_wordpress.skp 782us -> 784us 1x desk_samoasvg.skp 762us -> 761us 1x tabl_mozilla.skp 1.58ms -> 1.58ms 1x tabl_slashdot.skp 107us -> 107us 1x tabl_techmeme.skp 102us -> 102us 0.99x tabl_gamedeksiam.skp 729us -> 724us 0.99x tabl_nofolo.skp 65.3us -> 64.7us 0.99x desk_gmailthread.skp 339us -> 336us 0.99x tabl_sahadan.skp 91us -> 90us 0.99x desk_yahooanswers.skp 144us -> 142us 0.99x tabl_cnet.skp 143us -> 141us 0.99x tabl_googleblog.skp 206us -> 203us 0.99x tabl_cnn.skp 160us -> 158us 0.99x tabl_frantzen.skp 50.5us -> 49.6us 0.98x desk_linkedin.skp 328us -> 323us 0.98x tabl_digg.skp 790us -> 769us 0.97x desk_jsfiddlebigcar.skp 40.6us -> 39.5us 0.97x desk_mapsvg.skp 1.57ms -> 1.52ms 0.97x tabl_gmail.skp 19.4us -> 18.6us 0.96x tabl_hsfi.skp 9.81us -> 9.11us 0.93x BUG=skia: Review URL: https://codereview.chromium.org/793033002
* valgrind static uninit fixGravatar joshualitt2014-12-12
| | | | | | | TBR= BUG=skia: Review URL: https://codereview.chromium.org/800873002
* Fix float and half float support on mobile.Gravatar jvanverth2014-12-12
| | | | | | | It's unclear what params should be used for half float alpha rendertargets, so they are disabled for the moment. Review URL: https://codereview.chromium.org/799593002
* Remove GP from drawstate, revision of invariant output for GPGravatar joshualitt2014-12-11
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/c6bc58eded89b0c0a36b8e20e193c200f297a0da Review URL: https://codereview.chromium.org/791743003
* Adding a custom data field to GrGpuResourceGravatar junov2014-12-11
| | | | | | | | | | Motivation: allow Blink to track pre-existing mailbox names for textures that are recycled by the ganesh scratch texture pool. BUG=440462 TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/796163002
* Fix some win64 warnings.Gravatar bsalomon2014-12-11
| | | | Review URL: https://codereview.chromium.org/795223002
* Create xfer processor backend.Gravatar egdaniel2014-12-11
| | | | | | | | | | | | | This includes: -Having an actual XP stage at the end of the gl pipeline. -All Blending work is handled by XP until actually setting GL blend states -GLPrograms test to test XP BUG=skia: Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904 Review URL: https://codereview.chromium.org/764643004
* Apply the layer's image filter to the hoisted imageGravatar robertphillips2014-12-11
| | | | | | | | Exposing SkSurface_Gpu makes me sad and I would welcome alternatives. This change is desireable since it greatly decreases the render target swaps. Review URL: https://codereview.chromium.org/792923002
* Really fix valgrind issueGravatar joshualitt2014-12-11
| | | | | | | TBR= BUG=skia: Review URL: https://codereview.chromium.org/795123002
* Revert of Create xfer processor backend. (patchset #6 id:100001 of ↵Gravatar joshualitt2014-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/764643004/) Reason for revert: CL breaks windows DM Original issue's description: > Create xfer processor backend. > > This includes: > -Having an actual XP stage at the end of the gl pipeline. > -All Blending work is handled by XP until actually setting GL blend states > -GLPrograms test to test XP > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904 TBR=bsalomon@google.com,joshualitt@chromium.org,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/789343002
* Revert of Fix to set correct output type when blending when we've read dst ↵Gravatar joshualitt2014-12-10
| | | | | | | | | | | | | | | | | | | | | (patchset #4 id:60001 of https://codereview.chromium.org/791143002/) Reason for revert: Breaks DM on windows Original issue's description: > Fix to set correct output type when blending when we've read dst > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/733fc2054044377e914559fa4f46db66ab7d9cea TBR=bsalomon@google.com,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/795783002
* fix for chrome bug with sub pixel hairlinesGravatar joshualitt2014-12-10
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/796573002
* Revert of Remove GP from drawstate, revision of invariant output for GP ↵Gravatar joshualitt2014-12-10
| | | | | | | | | | | | | | | | | | | | | (patchset #9 id:160001 of https://codereview.chromium.org/791743003/) Reason for revert: breaks mac Original issue's description: > Remove GP from drawstate, revision of invariant output for GP > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/c6bc58eded89b0c0a36b8e20e193c200f297a0da TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/794843002
* Remove GP from drawstate, revision of invariant output for GPGravatar joshualitt2014-12-10
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/791743003
* Fix to set correct output type when blending when we've read dstGravatar egdaniel2014-12-10
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/791143002
* fix for valgrind uninit variablesGravatar joshualitt2014-12-10
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/793773002
* Create xfer processor backend.Gravatar egdaniel2014-12-10
| | | | | | | | | | | This includes: -Having an actual XP stage at the end of the gl pipeline. -All Blending work is handled by XP until actually setting GL blend states -GLPrograms test to test XP BUG=skia: Review URL: https://codereview.chromium.org/764643004
* Skia: Track the fIsWrapped separately so that we delete correctlyGravatar hendrikw2014-12-09
| | | | | | | | | | | | | | | GrGlTextureRenderTarget inherits virtually from both GrGlRenderTarget and GrGLTexture, which both have a 'wrap' flag. The passed in wrap setting could be different for the two base classes, but since it's virtually inherited, they share the same flag, so they're either both on, or both off. As a result, we fail to delete the frambuffer. To fix this, we now keep a separate isWrapped flag for GrGlRenderTarget. BUG=437998 Review URL: https://codereview.chromium.org/791493003
* 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
* Remove unused static function skcolor_to_grcolor_nopremultiply.Gravatar egdaniel2014-12-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/762223003
* Fix for alpha textures on Nexus 6.Gravatar jvanverth2014-12-09
| | | | | | | | Nexus 6 appears to require a sized internal format for A8 textures, much like other newer mobile devices. Changed to use sized format for A8 textures in general with ES 3.0. Review URL: https://codereview.chromium.org/783523003