Commit Graph

44 Commits

Author SHA1 Message Date
robertphillips
498d7ac86b Dependencies are now added between the drawTargets in GrPipeline
This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)

BUG=skia:4094

Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be

Committed: https://skia.googlesource.com/skia/+/869c5e82a725a6928a45cd1fa6945ac783b8b3d8

Review URL: https://codereview.chromium.org/1414903002
2015-10-30 10:11:30 -07:00
robertphillips
a352b14c87 Revert of Dependencies are now added between the drawTargets in GrPipeline (patchset #6 id:120001 of https://codereview.chromium.org/1414903002/ )
Reason for revert:
Breaking bots

Original issue's description:
> Dependencies are now added between the drawTargets in GrPipeline
>
> This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)
>
> BUG=skia:4094
>
> Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be
>
> Committed: https://skia.googlesource.com/skia/+/869c5e82a725a6928a45cd1fa6945ac783b8b3d8

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4094

Review URL: https://codereview.chromium.org/1417263002
2015-10-22 05:31:32 -07:00
robertphillips
869c5e82a7 Dependencies are now added between the drawTargets in GrPipeline
This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)

BUG=skia:4094

Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be

Review URL: https://codereview.chromium.org/1414903002
2015-10-22 05:19:50 -07:00
robertphillips
a106c62753 Loosen requirement that there be only one GrDrawTarget
BUG=skia:4094

Review URL: https://codereview.chromium.org/1406173003
2015-10-16 09:07:06 -07:00
egdaniel
ec00d94199 Move some of the adding stencil attachment logic of Gpu and into Render Target.
The new flow of calls for attaching a Stencil looks like:

Client
  rt->attachStencilAttachment()
    gpu->getStencilAttachment()
      glgpu->createStencilAttachment()
    glrt->completeStencilAttachment() //actually attaches

BUG=skia:

Review URL: https://codereview.chromium.org/1333383002
2015-09-14 12:56:10 -07:00
joshualitt
81793410a8 add ability to get FBO ID to Surface
BUG=skia:

Review URL: https://codereview.chromium.org/1220733007
2015-07-08 12:54:04 -07:00
mtklein
2766c00fc0 remove SkInstCnt
It's been outclassed by Valgrind and leak sanitizer,
and it seems to be causing problems for external folks building Skia.

I'm not sure why our own builds seem unaffected.

Latest thread:
https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0

BUG=skia:

Review URL: https://codereview.chromium.org/1217573002
2015-06-26 11:45:03 -07:00
vbuzinov
dded69693d Implement support for mixed sampled render targets
Adds a new FBO type kStencil_MSFBOType that is selected whenever
NV_framebuffer_mixed_samples extension is available.  In this new
FBO type a non-msaa color buffer is created with a multisampled
stencil buffer attachment.

Replaces numSamples() with separate numColorSamples and numStencilSamples
methods in RenderTarget.

In mixed samples mode non-MSAA codepaths are used to draw simple shapes,
while NVPR-rendered paths and text are rendered with a multisampled
stencil.

BUG=skia:3177

Review URL: https://codereview.chromium.org/1001503002
2015-06-12 08:59:45 -07:00
egdaniel
8dc7c3a839 Rename GrStencilBuffer to GrStencilAttachment
BUG=skia:

Review URL: https://codereview.chromium.org/1083133002
2015-04-16 11:22:42 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
bsalomon
6bc1b5fab8 Dynamically create stencil buffer when needed.
Review URL: https://codereview.chromium.org/938383004
2015-02-23 09:06:38 -08:00
kkinnunen
2340dcb02c Remove unused and unimplemented abstract functions from GrRenderTarget
Remove unused and unimplemented abstract functions from GrRenderTarget.
The functions might cause confusion later.

BUG=skia:3388

Review URL: https://codereview.chromium.org/865603007
2015-02-03 22:20:19 -08:00
bsalomon
5236cf480d Make uncached textures uncached from the get go.
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
2015-01-14 10:42:08 -08:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
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
2015-01-09 10:06:40 -08:00
bsalomon
87a94eb163 Rename and clarify semantics of GrContext::resolveRenderTarget.
Review URL: https://codereview.chromium.org/696293004
2014-11-03 14:28:32 -08:00
bsalomon
37dd331b20 Add class GrGLTextureRenderTarget for GL texture/rendertarget objects
BUG=skia:2889

Review URL: https://codereview.chromium.org/695813003
2014-11-03 08:47:23 -08:00
bsalomon
f2703d83da rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags
Review URL: https://codereview.chromium.org/682223002
2014-10-28 14:33:06 -07:00
bsalomon
81beccc4fb Devirtualize read/write pixels on surface.
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
2014-10-13 12:32:55 -07:00
bsalomon
49f085dddf "NULL !=" = NULL
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
commit-bot@chromium.org
089a780c33 Split GrResource into GrCacheable/GrGpuObject
Before this change, an object needed to inherit from GrResource (and
thus be a GPU object) in order to live in the GrResourceCache. That
was a problem for caching items that weren't GPU objects themselves,
but owned GPU objects.

This change splits GrResource into two classes:

  1. GrCacheable: The base class for objects that can live in the
     GrResourceCache.

  2. GrGpuObject, which inherits from GrCacheable: The base class for
     objects that get tracked by GrGpu.

This change is purely a refactor; there is no change in functionality.

Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e

BUG=skia:
R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/251013002

git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 21:38:22 +00:00
commit-bot@chromium.org
28361fad10 Add discard API to SkCanvas, plumb it to glDiscardFramebuffer()
BUG=skia:2349
R=robertphillips@google.com, reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/211683002

git-svn-id: http://skia.googlecode.com/svn/trunk@13976 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-28 16:08:05 +00:00
tfarina@chromium.org
f6de475e5c Replace uses of GrAssert by SkASSERT.
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
2013-08-17 00:02:59 +00:00
commit-bot@chromium.org
fd03d4a829 Replace all instances of GrRect with SkRect.
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
2013-07-17 21:39:42 +00:00
bsalomon@google.com
686bcb871b Reland of 8525 with fix for case when GrRT outlives GrTexture.
Review URL: https://codereview.chromium.org/13814015

git-svn-id: http://skia.googlecode.com/svn/trunk@8573 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 15:04:12 +00:00
bsalomon@google.com
e06f8ef5ba Revert 8525,8526 pending investigation of bench_pictures crashes.
git-svn-id: http://skia.googlecode.com/svn/trunk@8527 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 21:06:42 +00:00
bsalomon@google.com
d02e8803e9 Remove GrTexture::releaseRenderTarget() and add GrSurface::isSameAs().
Review URL: https://codereview.chromium.org/13414006

git-svn-id: http://skia.googlecode.com/svn/trunk@8525 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 19:49:13 +00:00
senorblanco@chromium.org
3cb406bb88 Implement support for origin-TopLeft render targets. Note that the default behaviour remains the same: textures default to origin-TopLeft, render targets default to origin-BottomLeft, and backend textures default to origin-BottomLeft. However, the caller can override the default by setting fOrigin in GrTextureDesc, GrBackendTextureDesc or GrBackendRenderTargetDesc.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7594 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 19:50:46 +00:00
robertphillips@google.com
cf9faf6ce9 Reverting r7545 (render target origin change) due to layout test issues (see https://codereview.chromium.org/12210002/)
git-svn-id: http://skia.googlecode.com/svn/trunk@7571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 14:05:06 +00:00
senorblanco@chromium.org
ed8659b51d Implement support for origin-TopLeft render targets in GL backend.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7545 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 17:29:51 +00:00
senorblanco@chromium.org
ef5dbe1cd9 Add an origin flag for backend (external) textures. Some textures in WebKit have a topdown orientation, and skia needs to be notified of this, so that they are not drawn upside-down.
Review URL: https://codereview.appspot.com/7200048

git-svn-id: http://skia.googlecode.com/svn/trunk@7414 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 16:42:38 +00:00
bsalomon@google.com
7283022819 Make GrResource know whether 3D objects' lifetimes are managed by Skia or not.
Review URL: https://codereview.appspot.com/7201046

git-svn-id: http://skia.googlecode.com/svn/trunk@7348 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 20:25:22 +00:00
reed@google.com
dd335aeb5d Change to BDS license (as we did with all the other files that were Apache)
Review URL: https://codereview.appspot.com/6948045

git-svn-id: http://skia.googlecode.com/svn/trunk@6787 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-13 19:24:05 +00:00
bsalomon@google.com
2d0baded0f Make the orientation of a texture accessible from and known by GrSurface.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6801044

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6148 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-26 19:01:17 +00:00
bsalomon@google.com
16e3ddea6a Platform/Engine -> Backend
createPlatform -> wrapBackend

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6785044

git-svn-id: http://skia.googlecode.com/svn/trunk@6123 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 18:43:28 +00:00
robertphillips@google.com
d6bbbf8a83 Simplified stencil buffer caching
https://codereview.appspot.com/6503073/



git-svn-id: http://skia.googlecode.com/svn/trunk@5400 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-05 15:46:34 +00:00
rmistry@google.com
fbfcd56021 Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:09:54 +00:00
bsalomon@google.com
0342a85091 Remove _UPM_ GrPixelConfigs
Review URL: http://codereview.appspot.com/6460113/



git-svn-id: http://skia.googlecode.com/svn/trunk@5196 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 19:22:38 +00:00
robertphillips@google.com
7d501ab502 Add GrSurface parent class above GrTexture & GrRenderTarget
http://codereview.appspot.com/6297092/



git-svn-id: http://skia.googlecode.com/svn/trunk@4292 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 21:09:06 +00:00
robertphillips@google.com
4d73ac22a1 Version 2 of the Instance Counting system. This one simplifies the print out of information.
http://codereview.appspot.com/6296069/



git-svn-id: http://skia.googlecode.com/svn/trunk@4255 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 18:54:08 +00:00
robertphillips@google.com
e98ade4fde Added Texture desc to render target
http://codereview.appspot.com/6302068/



git-svn-id: http://skia.googlecode.com/svn/trunk@4243 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 12:53:07 +00:00
bsalomon@google.com
75f9f25d8b Add code path for Gr client to resolve an Gr-created MSAA render target.
Review URL: http://codereview.appspot.com/5580049/


git-svn-id: http://skia.googlecode.com/svn/trunk@3112 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-31 13:35:56 +00:00
bsalomon@google.com
6f3795105b Make all pixel ops go thru ctx so we can correctly flush. Unify two texture upload code paths.
Review URL: http://codereview.appspot.com/5373108/



git-svn-id: http://skia.googlecode.com/svn/trunk@2701 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-16 20:36:03 +00:00
bsalomon@google.com
9962108c40 Remove allocated size vs content size in textures
Review URL: http://codereview.appspot.com/5373100/



git-svn-id: http://skia.googlecode.com/svn/trunk@2687 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-15 16:47:16 +00:00
bsalomon@google.com
d38f137e9b Move gpu/include/* to include/gpu and gpu/src/* to src/gpu
Review URL: http://codereview.appspot.com/5250070/



git-svn-id: http://skia.googlecode.com/svn/trunk@2471 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-10-12 19:53:16 +00:00