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
reed
3c06511e91
Add image->bitmap
...
BUG=skia:
patch from issue 1212163012 at patchset 1 (http://crrev.com/1212163012#ps1 )
Review URL: https://codereview.chromium.org/1208993017
2015-07-08 12:46:23 -07:00
reed
dca20ce4e1
explicitly bump legacy genID on gpu surface
...
Previous attempt to "test" getTextureHandle was giving false-positive because we had an active image-snapshot, which was incidentally also triggering a new genID.
I think this CL will also enable this change: https://codereview.chromium.org/1222243002/
BUG=skia:
TBR=bsalomon@google.com
NOTREECHECKS=True
Review URL: https://codereview.chromium.org/1208993008
2015-07-03 10:43:43 -07:00
bsalomon
d3e259a16c
Add SkSurface factory for wrapping an FBO in SkSurface
...
Review URL: https://codereview.chromium.org/1221853003
2015-06-30 12:04:40 -07:00
reed
09b2c932d8
augment surface tests to check legacy genID
...
BUG=skia:
Review URL: https://codereview.chromium.org/1219793002
2015-06-29 14:09:41 -07:00
reed
fa5e68e4b4
add getTextureHandle to SkSurface
...
BUG=485243
Review URL: https://codereview.chromium.org/1210303003
2015-06-29 07:37:01 -07:00
reed
f9ad558943
Revert of Revert of Return GrGLContext from GrTestTarget (patchset #1 id:1 of https://codereview.chromium.org/1211123004/ )
...
Reason for revert:
un-referting, did not help DEPS roll
Original issue's description:
> Revert of Return GrGLContext from GrTestTarget (patchset #3 id:40001 of https://codereview.chromium.org/1207393002/ )
>
> Reason for revert:
> speculative revert to unblock DEPS roll (layout-tests)
>
> Original issue's description:
> > Return GrGLContext from GrTestTarget
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/b6d93ea428ca5d13641c35faca7d0380980a3a17
>
> TBR=bsalomon@google.com ,joshualitt@google.com,joshualitt@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1852ec2b46a2a0efbb3550ff4d8b640f56a810e9
TBR=bsalomon@google.com ,joshualitt@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1215593002
2015-06-25 21:29:25 -07:00
reed
1852ec2b46
Revert of Return GrGLContext from GrTestTarget (patchset #3 id:40001 of https://codereview.chromium.org/1207393002/ )
...
Reason for revert:
speculative revert to unblock DEPS roll (layout-tests)
Original issue's description:
> Return GrGLContext from GrTestTarget
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b6d93ea428ca5d13641c35faca7d0380980a3a17
TBR=bsalomon@google.com ,joshualitt@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1211123004
2015-06-25 18:59:32 -07:00
joshualitt
b6d93ea428
Return GrGLContext from GrTestTarget
...
BUG=skia:
Review URL: https://codereview.chromium.org/1207393002
2015-06-25 15:02:22 -07:00
bsalomon
74f681dce2
Make SkGpuDevice know its alpha type
...
Make SkImage_Gpu snapshots opaque if surface is opaque.
BUG=skia:3965
Review URL: https://codereview.chromium.org/1205643002
2015-06-23 14:38:48 -07:00
reed
871872f3f2
change old picture serialization to really handle images
...
BUG=skia:3965
Review URL: https://codereview.chromium.org/1199473002
2015-06-22 12:48:26 -07:00
reed
de49988bc2
add callbacks to Images that wrap client-provided content
...
BUG=skia:
Review URL: https://codereview.chromium.org/1169553003
2015-06-18 13:41:40 -07:00
bsalomon
7a61793d96
Don't clear in SkSurface::NewWrappedRenderTarget
...
Review URL: https://codereview.chromium.org/1191513002
2015-06-16 08:07:16 -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
bsalomon
55812362f1
Towards removing getTexture() on SkImage
...
Review URL: https://codereview.chromium.org/1166993002
2015-06-10 08:49:28 -07:00
reed
41e010cb90
Revert[2] SkDraw and all Blitters to use pixmap instead of bitmapi
...
This reverts commit b3f0ec9f99
.
BUG=skia:
Review URL: https://codereview.chromium.org/1168303006
2015-06-09 12:16:53 -07:00
reed
8b26b99c97
new image from backend desc
...
BUG=485243
Review URL: https://codereview.chromium.org/1121813002
2015-05-07 15:36:18 -07:00
bsalomon
d309e7aa0e
This replaces the texture creation/caching functions on GrContext with a GrTextureProvider interface. The goal is to pass this narrowly focused object in places that currently take a GrContext but don't need and shouldn't use its other methods. It also has an extended private interface for interacting with non-texture resource types.
...
Review URL: https://codereview.chromium.org/1107973004
2015-04-30 14:18:54 -07:00
senorblanco
c8e934007a
Yet more ASAN fixes.
...
More nullptr checks for factories I have added.
Other checks more Yoda-like I have made. (Skia style this is.)
BUG=skia:
Review URL: https://codereview.chromium.org/1086393004
2015-04-21 07:20:36 -07:00
senorblanco
84bfd3958f
Another speculative ASAN fix.
...
Add a GrContext nullptr check in SurfaceTest.
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/1098993004
2015-04-21 06:59:17 -07:00
bsalomon
e4579adfdf
Add helper for creating a SkSurface from a client created texture.
...
Review URL: https://codereview.chromium.org/1071603002
2015-04-08 08:38:40 -07:00
reed
3ef71e343b
guarded change to SkImageGenerator to make getInfo() const
...
BUG=skia:
Review URL: https://codereview.chromium.org/1017293002
2015-03-19 08:31:14 -07:00
bsalomon
3582d3ee9f
Split out methods in GrGpuResource::CacheAccess that can be called outside of the cache.
...
Review URL: https://codereview.chromium.org/923143002
2015-02-13 14:20:05 -08:00
mtklein
31ff29829e
Don't leak image in Surface test.
...
==7023== 5,056 (896 direct, 4,160 indirect) bytes in 8 blocks are definitely lost in loss record 947 of 2,656
==7023== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7023== by 0x82CB99: SkNewImageFromBitmapTexture(SkBitmap const&, int, SkSurface::Budgeted) (SkImage_Gpu.cpp:64)
==7023== by 0x81A1CF: SkSurface_Gpu::onNewImageSnapshot(SkSurface::Budgeted) (SkSurface_Gpu.cpp:50)
==7023== by 0x694F9D: SkSurface::newImageSnapshot(SkSurface::Budgeted) (SkSurface_Base.h:92)
==7023== by 0x55EA7C: test_Surface(skiatest::Reporter*, GrContextFactory*) (SurfaceTest.cpp:485)
==7023== by 0x407CB2: run_test(skiatest::Test*) (DM.cpp:399)
==7023== by 0x408382: run_enclave_and_gpu_tests(SkTArray<Task, false>*) (DM.cpp:411)
==7023== by 0x68B71E: SkTaskGroup::wait() (SkTaskGroup.cpp:67)
==7023== by 0x40934E: dm_main() (DM.cpp:455)
==7023== by 0x409483: main (DM.cpp:477)
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/276/steps/dm/logs/stdio
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/872183002
2015-01-24 11:27:27 -08:00
bsalomon
eaaaf0b16c
Take budgeted param when snapping new image.
...
Review URL: https://codereview.chromium.org/872543002
2015-01-23 08:08:04 -08:00
bsalomon
afe3005be3
Require budget decision when creating a RenderTarget SkSurface.
...
Restructure SkGpuDevice creation:
*SkSurfaceProps are optional.
*Use SkSurfaceProps to communicate DF text rather than a flag.
*Tell SkGpuDevice::Create whether RT comes from cache or not.
Review URL: https://codereview.chromium.org/848903004
2015-01-16 07:32:33 -08:00
reed
5965c8ae4e
add ImageGenerator::NewFromData to porting layer
...
BUG=skia:3275
Review URL: https://codereview.chromium.org/834633006
2015-01-07 18:04:45 -08:00
reed
b2497c2d94
change API contract: disallow zero-sized images or surfaces
...
BUG=skia:
Review URL: https://codereview.chromium.org/830033003
2014-12-31 12:31:43 -08:00
reed
96472deea7
dd readPixels to SkImage
...
patch from issue 789673007 at patchset 1 (http://crrev.com/789673007#ps1 )
BUG=skia:
Review URL: https://codereview.chromium.org/793723002
2014-12-10 09:53:42 -08:00
Florin Malita
c54d8db4d1
Remove SkCanvas::drawBitmapMatrix()
...
R=mtklein@google.com , reed@google.com , robertphillips@google.com
Review URL: https://codereview.chromium.org/789033002
2014-12-10 12:02:16 -05:00
reed
67f2eb45b9
fix surface test for gpu and codecs
...
BUG=skia:
Review URL: https://codereview.chromium.org/789173004
2014-12-10 06:54:06 -08:00
mtklein
bbb61d7268
make SkRefCnt::getRefCnt() debug-only, remove it from SkNVRefCnt.
...
Only (unused) API removed.
TBR=reed@google.com
BUG=skia:3160
Review URL: https://codereview.chromium.org/752263002
2014-11-24 13:09:39 -08:00
bsalomon
71cb0c241e
Replace GrResourceCache with GrResourceCache2.
...
BUG=skia:2889
Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89
Review URL: https://codereview.chromium.org/716143004
2014-11-14 12:10:15 -08:00
bsalomon
ac49acda52
Revert of Replace GrResourceCache with GrResourceCache2. (patchset #7 id:120001 of https://codereview.chromium.org/716143004/ )
...
Reason for revert:
broken again
Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
>
> Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889
Review URL: https://codereview.chromium.org/726913002
2014-11-14 06:47:39 -08:00
bsalomon
407aa584d1
Replace GrResourceCache with GrResourceCache2.
...
BUG=skia:2889
Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
Review URL: https://codereview.chromium.org/716143004
2014-11-14 06:29:40 -08:00
bsalomon
f21dab9540
Revert of Replace GrResourceCache with GrResourceCache2. (patchset #6 id:100001 of https://codereview.chromium.org/716143004/ )
...
Reason for revert:
Breaking stuff
Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889
Review URL: https://codereview.chromium.org/715333003
2014-11-13 13:33:28 -08:00
bsalomon
66a450f21a
Replace GrResourceCache with GrResourceCache2.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/716143004
2014-11-13 13:19:10 -08:00
reed
4a8126e7f8
Introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/ )"
...
This reverts commit 29c857d0f3
.
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/588143004
2014-09-22 07:29:03 -07:00
reed
29c857d0f3
Revert of introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/ )
...
Reason for revert:
Broke call site in WebKit
Original issue's description:
> introduce Props to surface (work in progress)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda
R=robertphillips@google.com , bsalomon@google.com , jvanverth@google.com , bungeman@google.com , fmalita@google.com , vangelis@chromium.org , reed@google.com
TBR=bsalomon@google.com , bungeman@google.com , fmalita@google.com , jvanverth@google.com , reed@google.com , robertphillips@google.com , vangelis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/583773004
2014-09-21 10:25:07 -07:00
reed
3716fd067a
introduce Props to surface (work in progress)
...
BUG=skia:
R=robertphillips@google.com , bsalomon@google.com , jvanverth@google.com , bungeman@google.com , fmalita@google.com , vangelis@chromium.org , reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/551463004
2014-09-21 09:39:55 -07:00
piotaixr
0d276f71d2
Bis: Use SkImage::NewFromGenerator() instead of SkImage::newEncodedData()
...
BUG=skia:2948
R=junov@chromium.org , reed@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/579923002
2014-09-18 11:55:14 -07:00
reed
9594da111d
use SkData::NewUninitialized
...
BUG=skia:
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/565803005
2014-09-12 12:12:27 -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
reed
e5ea500d47
Hide fields in SkImageInfo
...
R=rmistry@google.com
TBR=bsalomon
Author: reed@google.com
Review URL: https://codereview.chromium.org/536003002
2014-09-03 11:54:58 -07:00
bsalomon
e904c09a3a
Fix alpha textures in NV ES3 contexts on Windows.
...
Make unit tests iterate over all the rendering GL context types rather than using kNative.
Fix the extension printing when gStartupSpew is set.
R=jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/398183002
2014-07-17 10:50:59 -07:00
Mike Klein
874a62acef
Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."
...
This reverts commit 4ae94ffce5
.
BUG=skia:
Review URL: https://codereview.chromium.org/382523002
2014-07-09 09:04:07 -04:00
mtklein
4ae94ffce5
Remove ability for Release code to call getRefCnt() or getWeakRefCnt().
...
These getRefCnt() methods are not thread safe, so Skia code should not
be calling them. unique() is fine.
SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt().
This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in
both debug and release modes.
BUG=skia:2726
R=senorblanco@chromium.org , mtklein@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/378643003
2014-07-08 06:48:17 -07:00
reed
982542dce8
add SkSurface::NewRasterDirectReleaseProc
...
allows for lifetime control of pixel memory on raster surface
BUG=skia:
R=fmalita@google.com , bsalomon@google.com , fmalita@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/351373005
2014-06-27 06:48:14 -07:00
commit-bot@chromium.org
00f8d6c75d
Revert "Revert of add colortable support to imagegenerator ( https://codereview.chromium.org/304443003/ )"
...
Fix is to add colortable param to installPixels()
This reverts commit 924205aaf2
.
BUG=skia:
R=scroggo@google.com , reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/300263005
git-svn-id: http://skia.googlecode.com/svn/trunk@14958 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-29 15:57:20 +00:00
commit-bot@chromium.org
95c2003740
cleanup GrContext resource cache api
...
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/275563005
git-svn-id: http://skia.googlecode.com/svn/trunk@14669 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 14:29:32 +00:00