Commit Graph

94 Commits

Author SHA1 Message Date
Greg Daniel
e252f08982 Add hint to SkSurface::MakeRenderTarget that we will use mips
Additionally this changed triggered a cascade of plumbing GrMipMapped
down throughout Ganesh.

Bug: skia:
Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb
Reviewed-on: https://skia-review.googlesource.com/63000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-23 20:25:59 +00:00
Robert Phillips
b0e93a22bb Remove origin field from GrSurface (take 2)
This mainly consists of rm origin from GrSurface and the wrapBackEnd*
methods and then re-adding an explicit origin parameter to all the
GrGpu methods that need it.

TBR=bsalomon@google.com

Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74
Reviewed-on: https://skia-review.googlesource.com/30280
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-29 17:36:31 +00:00
Robert Phillips
7294b851d2 Revert "Remove origin field from GrSurface"
This reverts commit df0e09feac.

Reason for revert: Experimental revert to see if this is blocking the roll


Original change's description:
> Remove origin field from GrSurface
> 
> This mainly consists of rm origin from GrSurface and the wrapBackEnd*
> methods and then re-adding an explicit origin parameter to all the 
> GrGpu methods that need it.
> 
> Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18
> Reviewed-on: https://skia-review.googlesource.com/26363
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/29220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-01 13:51:54 +00:00
Robert Phillips
df0e09feac Remove origin field from GrSurface
This mainly consists of rm origin from GrSurface and the wrapBackEnd*
methods and then re-adding an explicit origin parameter to all the 
GrGpu methods that need it.

Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18
Reviewed-on: https://skia-review.googlesource.com/26363
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-31 16:02:42 +00:00
Brian Salomon
d34edf3dc9 Revert "Revert "Remove GrSurfaceDesc member from GrSurface.""
This reverts commit 4b30a96a3e.

Bug: skia:
Change-Id: I14d5b402c87df8fffbc29f16686fcfa18474fc48
Reviewed-on: https://skia-review.googlesource.com/17408
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-21 11:41:17 +00:00
Greg Daniel
4b30a96a3e Revert "Remove GrSurfaceDesc member from GrSurface."
This reverts commit 84911546b9.

Reason for revert: Breaking bots possibly?

Original change's description:
> Remove GrSurfaceDesc member from GrSurface.
> 
> Change-Id: I0fe979994e1e3fc457b952dfb5e0090c45fad771
> Reviewed-on: https://skia-review.googlesource.com/17273
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I404e509fcd3e3d5527b3bc6e286b7d436c12e879
Reviewed-on: https://skia-review.googlesource.com/17364
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-18 18:13:48 +00:00
Brian Salomon
84911546b9 Remove GrSurfaceDesc member from GrSurface.
Change-Id: I0fe979994e1e3fc457b952dfb5e0090c45fad771
Reviewed-on: https://skia-review.googlesource.com/17273
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-18 16:56:50 +00:00
Brian Salomon
d1eaf49e0b Revert "Revert "Remove GrSurface::desc() method.""
This reverts commit c96da1e51e.

Bug: skia:
Change-Id: I8242400a137413c01c7ef614b4fa733be7dcf939
Reviewed-on: https://skia-review.googlesource.com/17311
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-18 16:20:55 +00:00
Greg Daniel
c96da1e51e Revert "Remove GrSurface::desc() method."
This reverts commit 9ac9953544.

Reason for revert: Lots of broken gold images

Original change's description:
> Remove GrSurface::desc() method.
> 
> Change-Id: If158dee90b3b0f80aa9c674180fbe6abd5b27d3f
> Reviewed-on: https://skia-review.googlesource.com/17268
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5608c0e287e301aeac81dd3249a5c34d4603fcc6
Reviewed-on: https://skia-review.googlesource.com/17306
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-18 13:12:42 +00:00
Brian Salomon
9ac9953544 Remove GrSurface::desc() method.
Change-Id: If158dee90b3b0f80aa9c674180fbe6abd5b27d3f
Reviewed-on: https://skia-review.googlesource.com/17268
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-17 19:50:10 +00:00
Brian Salomon
154ce91dc9 Replace most uses of GrSurface::desc() with conifg(), width(), etc.
Change-Id: Ic283c0ddf9efa0a467e97e10f5413ba9dfcb414f
Reviewed-on: https://skia-review.googlesource.com/17211
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-17 18:56:50 +00:00
Brian Salomon
bb5711a5e4 Remove GrSurfaceDesc member from GrSurfaceProxy.
Stores the config, origin, and dimensions in GrSurfaceProxy, sample count in GrRenderTargetProxy, and "was constructed with mip maps" in GrTextureProxy.

Change-Id: Iee058674dce49107a991cca9d083cd33e3572809
Reviewed-on: https://skia-review.googlesource.com/17209
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-17 18:17:50 +00:00
Greg Daniel
cef213c97e Move ReleaseProc info to GrTexture and for implementations to define it.
Bug: skia:
Change-Id: I0dbe421ebd17ef7d21fd2f4f027d2a3bdcf04b7b
Reviewed-on: https://skia-review.googlesource.com/14031
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-21 17:20:27 +00:00
Robert Phillips
c589b0b5c0 Remove lastOpList capability from GrSurface
This is split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists)

TBR=bsalomon@google.com

Change-Id: I80d589b42918ddd77538484c808b069576691da4
Reviewed-on: https://skia-review.googlesource.com/11793
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-04-17 12:41:59 +00:00
Robert Phillips
e78b7259c3 Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv (take 3)
This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling.

This is a re-reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv)

Change-Id: Icfb9dd223418dd460405efd2bfd9d1c356beed1a
Reviewed-on: https://skia-review.googlesource.com/11412
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-06 12:45:02 +00:00
Robert Phillips
1b35256f11 Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv (take 2)"
This reverts commit aaee31f18c.

Reason for revert: possible valgrind leak

Original change's description:
> Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv (take 2)
> 
> This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling.
> 
> This is a reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv)
> 
> Change-Id: Icd0a90d2beb483dc24ed87c3bace9c817019e148
> Reviewed-on: https://skia-review.googlesource.com/11326
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia0b92bf6402cb5f9607310d356f43bff2e3e75eb
Reviewed-on: https://skia-review.googlesource.com/11361
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-05 18:56:33 +00:00
Robert Phillips
aaee31f18c Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv (take 2)
This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling.

This is a reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv)

Change-Id: Icd0a90d2beb483dc24ed87c3bace9c817019e148
Reviewed-on: https://skia-review.googlesource.com/11326
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-05 17:00:10 +00:00
Robert Phillips
171cc5fc87 Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv"
This reverts commit fb0bd98a43.

Reason for revert: ANGLE failures

Original change's description:
> Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv
> 
> This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling.
> 
> Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0
> Reviewed-on: https://skia-review.googlesource.com/11200
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I7241070dc1f9df47181061e07adab141f9857974
Reviewed-on: https://skia-review.googlesource.com/11324
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-05 12:46:02 +00:00
Robert Phillips
fb0bd98a43 Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv
This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling.

Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0
Reviewed-on: https://skia-review.googlesource.com/11200
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-05 11:55:35 +00:00
Robert Phillips
1ec1faaff4 Remove GrSurface::flushWrites
Change-Id: Ifac5af00ef852ee212964baa113b490a03e0168d
Reviewed-on: https://skia-review.googlesource.com/10293
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-29 12:48:17 +00:00
Brian Osman
b62ea2240f Change GPU read/write pixels API to support color space conversion
GrContext still doesn't convert, but it has the source and destination
color spaces, and call sites are supplying appropriate values where it
makes sense.

BUG=skia:

Change-Id: Ia88733125b8090776cfc9b0dc8030cce365b0b8b
Reviewed-on: https://skia-review.googlesource.com/6400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-22 16:44:56 +00:00
Robert Phillips
31c2608e85 Demote savePixels to save_pixels
This CL again only really makes sense in the bigger picture of moving readPixels off of GrTexture

Change-Id: Ib76482d8a773144e8fc7c6e55b2c7fa7b3ea0ecf
Reviewed-on: https://skia-review.googlesource.com/6086
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 20:48:32 +00:00
Robert Phillips
b446088690 Fix computation of texture size for approximately-fit deferred proxies
For approximate-fit deferred proxies asserts were firing when the instantiated size was larger than the pre-computed exact-fit size.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4972

Change-Id: I879e16b86ab4d9ef9834163c24ccd6507fe4b94a
Reviewed-on: https://skia-review.googlesource.com/4972
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-17 20:47:18 +00:00
Robert Phillips
d6214d4f46 Further centralize computation of GrSurface VRAM consumption - take 2
This is the same as https://skia-review.googlesource.com/c/4383/ (Further centralize computation of GrSurface VRAM consumption) but with a suppression for Vulkan in the new test and removal of an assert Chromium was triggering.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4450

Change-Id: Ie87d32fd5f0d35c21326b066a0c733cb6f8a5bea
Reviewed-on: https://skia-review.googlesource.com/4450
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-07 14:34:47 +00:00
Ben Wagner
9c46b68d53 Revert "Further centralize computation of GrSurface VRAM consumption"
This reverts commit ccd3c8937f.

Reason for revert: Blocking Chromium roll: https://codereview.chromium.org/2482643002/

Original change's description:
> Further centralize computation of GrSurface VRAM consumption
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4383
> 
> Change-Id: I054b74f2cd15f904f8e05af0fda58d6e8a523eb9
> Reviewed-on: https://skia-review.googlesource.com/4383
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=662630

Change-Id: I186db2a41eb2bd789e6f681b3547e32d9ca374cf
Reviewed-on: https://skia-review.googlesource.com/4443
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2016-11-06 12:47:22 +00:00
Robert Phillips
ccd3c8937f Further centralize computation of GrSurface VRAM consumption
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4383

Change-Id: I054b74f2cd15f904f8e05af0fda58d6e8a523eb9
Reviewed-on: https://skia-review.googlesource.com/4383
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-04 15:35:51 +00:00
Brian Osman
1105224f97 Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030

Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-27 19:14:09 +00:00
Robert Phillips
f2361d2d93 Add GrOpList and rename GrDrawTarget to GrRenderTargetOpList
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3910

Change-Id: I026aa26ecc61a0d002e98892dca728536259e8b1
Reviewed-on: https://skia-review.googlesource.com/3910
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-10-26 00:48:37 +00:00
robertphillips
13a7eee250 Flush some non-substantive Ganesh changes
Split out of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2299523004

Review-Url: https://codereview.chromium.org/2299523004
2016-08-31 15:06:24 -07:00
robertphillips
f1c6cd7603 Rename WorseCaseSize to WorstCasSize
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259863002

Review-Url: https://codereview.chromium.org/2259863002
2016-08-18 07:11:13 -07:00
robertphillips
8c523e0f3f Move prepareForExternalIO from GrRenderTarget to GrDrawContext
This is part of the push to remove GrRenderTarget from SkGpuDevice

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182543003

Review-Url: https://codereview.chromium.org/2182543003
2016-07-26 07:41:01 -07:00
brianosman
396fcdba14 Cleanup of code that converts from GPU-backed resources to SkImageInfo
Functions like GrMakeInfoFromTexture encouraged incorrect code to be
written. Similarly, the ability to construct an info from any GrSurface
was never going to be correct. Luckily, the only client of that had all
of the correct parameters much higher on the stack (and dictated or
replaced most of the properties of the returned info anyway).

With this, I can finally remove the color space as an output of the
pixel config -> color type conversion, which was never going to be
correct.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2173513002

Review-Url: https://codereview.chromium.org/2173513002
2016-07-22 06:26:11 -07:00
brianosman
2d1ee7936e Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel
buffer. (Only on Windows at the moment). Uses new effect to do the final
gamma adjustment

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919993002

Review-Url: https://codereview.chromium.org/1919993002
2016-05-05 12:24:31 -07:00
kkinnunen
2e6055b3ea Refactor to separate backend object lifecycle and GpuResource budget decision
Refactor GrGpuResource to contain two different pieces of state:
 a) instance is budgeted or not budgeted
 b) instance references wrapped backend objects or not

The "object lifecycle" was also attached to backend object
handles (ids), which made the code a bit unclear. Backend objects
would be associated with GrGpuResource::LifeCycle, even though
GrGpuResource::LifeCycle refers to the GpuResource, and individual
backend objects in one GpuResource might be governed with different
"lifecycle".

Mark the budgeted/not budgeted with SkBudgeted::kYes, SkBudgeted::kNo.
This was previously GrGpuResource::kCached_LifeCycle,
GrGpuResource::kUncached_LifeCycle.

Mark the "references wrapped object" with boolean. This was previously
GrGpuResource::kBorrowed_LifeCycle,
GrGpuResource::kAdopted_LifeCycle for GrGpuResource.

Associate the backend object ownership status with
GrBackendObjectOwnership for the backend object handles.

The resource type leaf constuctors, such has GrGLTexture or
GrGLTextureRenderTarget take "budgeted" parameter. This parameter
is passed to GrGpuResource::registerWithCache().

The resource type intermediary constructors, such as GrGLTexture
constructors for class GrGLTextureRenderTarget do not take "budgeted"
parameters, intermediary construtors do not call registerWithCache.

Removes the need for tagging GrGpuResource -derived subclass
constructors with "Derived" parameter.

Makes instances that wrap backend objects be registered with
a new function GrGpuResource::registerWithCacheWrapped().

Removes "budgeted" parameter from classes such as StencilAttahment, as
they are always cached and never wrap any external backend objects.

Removes the use of concept "external" from the member function names.
The API refers to the objects as "wrapped", so make all related
functions use the term consistently.

No change in functionality. Resources referencing wrapped objects are
always inserted to the cache with budget decision kNo.

BUG=594928
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862043002

Review URL: https://codereview.chromium.org/1862043002
2016-04-22 01:48:29 -07:00
cblume
6121405df5 Cleaning up trailing spaces and typos.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1631993002

Review URL: https://codereview.chromium.org/1631993002
2016-01-26 09:10:48 -08:00
robertphillips
6e83ac778f Defer flushes if kPreferNoIO is specified
Prior to this patch clients who were solely uploading to textures (e.g., SW Mask Mgr) would cause extra flushes b.c., even though kPreferNoIO was being specified, resources with pending IO would still be returned even though there was plenty of space in the resource cache.

Review URL: https://codereview.chromium.org/1286203002
2015-08-13 05:19:14 -07:00
bsalomon
cc97ece058 Add SK_API to GrSurface
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1209043012
2015-07-08 07:53:10 -07:00
bsalomon
c49e8682ab Rename flushForExternalRead->flushForExternalIO and always call in SkSurface::getTextureHandle
Review URL: https://codereview.chromium.org/1216243003
2015-06-30 11:37:35 -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
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
35a5261085 privatize
BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1189173005
2015-06-18 14:05:07 -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
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
bsalomon
a2c2323005 Remove GrSurface::isSameAs
Review URL: https://codereview.chromium.org/753783003
2014-11-25 07:41:12 -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
e30597375c Remove uses of GrAutoScratchTexture.
Rename GrContext::lockAndRefScratchTexture to refScratchTexture.

GrSurface::writePixels returns bool instead of void.

BUG=skia:2889

Review URL: https://codereview.chromium.org/638403003
2014-10-14 11:47:22 -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
f80bfedc42 GrContext::copyTexture->GrContext::copySurface.
Add a flush writes pixel ops flag.

Add an explicit flush writes for GrSurface.

BUG=skia:2977

Committed: https://skia.googlesource.com/skia/+/cf99b00980b6c9c557e71abf1a7c9f9b21217262

Review URL: https://codereview.chromium.org/622663002
2014-10-07 05:56:02 -07:00