This CL fixes:
isConfigTexturable was returning true for:
kRG_float for ANGLE ES2 configs
isConfigRenderable was returning true for:
kAlpha_8 for ANGLE ES2 configs
isConfigTexturable and isConfigRenderable were returning true for:
SBGRA on ES2
The NexusPlayer was marking RGBA & RG float configs as renderable but not textureable
Bug: 720325
Change-Id: If21361870dbdde8f3e09bc9dff3a394f2a329157
Reviewed-on: https://skia-review.googlesource.com/17387
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:
Change-Id: Ia4f892368fceda4a99490f5bd29851837a7a6927
Reviewed-on: https://skia-review.googlesource.com/17212
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Change-Id: Ib9f59ddf1c2c3f2bd0004ae16f842e52f45df8c9
Reviewed-on: https://skia-review.googlesource.com/16832
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We'll now run non-rendering and raster benchmarks,
for simplicity choosing sRGB as the only raster configuration.
$ ninja -C out monobench; and out/monobench "linear_clamp_(3color|pos)\$"
gradient_linear_clamp_…
6257 …3color 1x …pos 1.03x
$ ninja -C out monobench; and out/monobench "linear_clamp_.*[^4][^f]\$"
gradient_linear_clamp_…
321 …shallow 1x …shallow_dither 1x …3color 1.49x …hicolor 1.5x …pos 1.52x
Change-Id: I7282a84c982eb1f11f0ea2dfe39afea66231761c
Reviewed-on: https://skia-review.googlesource.com/16877
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: I997c6269e4676bf4cedddcd87e71d107053678bb
Reviewed-on: https://skia-review.googlesource.com/16905
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Chromium usually calls SetInstance once per process. However, when run in single process more renderer threads will try to set the instance after the browser process already has done so. This allows them to fail gracefully without asserting.
Bug: skia:6603
Change-Id: Ic8a35422d787335aa67eefc07d0658f0fbe73db4
Reviewed-on: https://skia-review.googlesource.com/16664
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This is fairly aggressive in that it will break any client
that is currently using SkImageGenerator with kIndex8.
I'm guessing that we don't have any clients doing that.
Bug: skia:6620
Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca
Reviewed-on: https://skia-review.googlesource.com/16601
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This adds perspective to GrNewNonAAFillRectOp, renames it to GrNonAAFillRectOp, and deletes the previous version of that namespace.
Change-Id: I20f35bf019f9c9105e6ec83dda11328451138109
Reviewed-on: https://skia-review.googlesource.com/15634
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I2b26ccd017d9e66ced41a1af04929e2d83a5a2d5
Reviewed-on: https://skia-review.googlesource.com/16343
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: I3d25a2aa9ae6dacb52779142cea062c7d9df40f5
Reviewed-on: https://skia-review.googlesource.com/16238
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.
Re-land of https://skia-review.googlesource.com/c/14180/
Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Certain systems experience a leak in the GL driver associated with
stencil buffers. Attempts to avoid the leak (while still using stencil
buffers) dind't succeed. This patch adds a GrContextOption
fAvoidStencilBuffers. This disables certain path rendering modes, as
well as stencil based masking/clipping.
Bug: 713854
Change-Id: Ifa6c0f2bd5ee395547bda9165d6c79d197ae8b8b
Reviewed-on: https://skia-review.googlesource.com/15253
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 83b1b3db36.
Reason for revert: unit test failing and asan leaks
Original change's description:
> Added SkImage::MakeCrossContextFromEncoded
>
> Designed for Flutter's threading architecture, with
> an eye to being useful to other clients. Under the
> hood, uses a new image generator class to lazily wrap
> a texture for multiple GrContexts.
>
> Bug: skia:
> Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
> Reviewed-on: https://skia-review.googlesource.com/14180
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I1f0bf580aa0ea2d132e18b64ff610ddac9d073a7
Reviewed-on: https://skia-review.googlesource.com/15892
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.
Bug: skia:
Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
Reviewed-on: https://skia-review.googlesource.com/14180
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
I can't tell you how excited I am to turn down the libpng settings...
anything that saves me a few seconds is a nice quality of life win.
This CL makes ok run in about half the time when producing .pngs.
Profile running `ok gm srgb png` before:
10.59 s 16.5% 10.59 s longest_match
8.98 s 14.0% 8.98 s png_setup_paeth_row
8.93 s 13.9% 8.93 s skia_png_write_find_filter
7.75 s 12.1% 7.75 s deflate_slow
4.63 s 7.2% 4.63 s std::wait_until(...) const
959.00 ms 1.5% 959.00 ms SkPathRef::validate() const
935.00 ms 1.4% 935.00 ms sk_to_srgb_hsw
...
After:
2.35 s 8.7% 2.35 s std::wait_until(...) const
1.70 s 6.2% 1.70 s longest_match
1.19 s 4.4% 1.19 s deflate_fast
931.00 ms 3.4% 931.00 ms SkPathRef::validate() const
898.00 ms 3.3% 898.00 ms sk_to_srgb_hsw
...
Change-Id: I425c30b2ecd97a0e4a4392779de6301db473ee47
Reviewed-on: https://skia-review.googlesource.com/15547
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Adds a new postFlush method and renames the class to
GrOnFlushCallbackObject. Also removes the ref counting in favor of
making the callback object a purely virtual interface. ref/unref on the
callback interface would conflict with existing ref/unref methods on the
subclass. It is now the caller’s responsibility to ensure the lifetime
of the callback is tied to that of the context.
Bug: skia:
Change-Id: I2fc1f98c700032e296a36f3a9a09c0753ab47aea
Reviewed-on: https://skia-review.googlesource.com/15463
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Also enables mouse support in Viewer.
Change-Id: Iaed08d42a64f591f0cd9b24684b3aee43404ed94
Reviewed-on: https://skia-review.googlesource.com/15313
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
high-contrast gms differ at most by 1 bit
Bug: skia:
Change-Id: I1308bd105020ea3cd5a30fd3dd322ed134fb5ed5
Reviewed-on: https://skia-review.googlesource.com/15249
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
SkLights.h pulls in a bunch of other headers and is not needed (fwdecl
works fine).
Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb
TBR=reed@google.com
Reviewed-on: https://skia-review.googlesource.com/15143
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Change-Id: Ic375a593bcf67aad0d7bd0847ea6bcd0b9ac4ab6
Reviewed-on: https://skia-review.googlesource.com/15160
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:6557
Change-Id: I0dbf70c4131ab59e7fc6c674a6587767af98e13a
Reviewed-on: https://skia-review.googlesource.com/15151
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I0ff11088465a4702acf9841a791d76f286ddbaf1
Reviewed-on: https://skia-review.googlesource.com/15147
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:6557
Change-Id: I6482d74be7b360c93141a73dd80c67854530c7a1
Reviewed-on: https://skia-review.googlesource.com/15101
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit 9ff301bf91.
Reason for revert: need to update G3, Flutter.
Original change's description:
> Remove SkLights include from SkCanvas.h
>
> SkLights.h pulls in a bunch of other headers and is not needed (fwdecl
> works fine).
>
> Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f
> Reviewed-on: https://skia-review.googlesource.com/14904
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>
TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I4799ad5b31aaeaf529c8b912bbe09aa8869a5e6c
Reviewed-on: https://skia-review.googlesource.com/15107
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
SkLights.h pulls in a bunch of other headers and is not needed (fwdecl
works fine).
Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f
Reviewed-on: https://skia-review.googlesource.com/14904
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: Ieb5cff92bae1aa64df5bc7f3a398514fe5b20f77
Reviewed-on: https://skia-review.googlesource.com/14956
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Tool now parses A2B images/profiles.
Tool can now display a cross-section based visualization for the color
look-up tables in A2B profiles.
BUG=skia:
Change-Id: I68abb3e947b080c533e283783d7859feea8d35d6
Reviewed-on: https://skia-review.googlesource.com/6119
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
This reverts commit e3bd422faf.
Reason for revert: Pre-req changes have all landed in other projects at this point.
Original change's description:
> Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
>
> This reverts commit fdd77daedb.
>
> Reason for revert: Apparently I have a few more build files to update before this can land.
>
> Original change's description:
> > Plumb the use of GrBackendRenderTarget throughout Skia
> >
> > Bug: skia:
> > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
> > Reviewed-on: https://skia-review.googlesource.com/14148
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f
> Reviewed-on: https://skia-review.googlesource.com/14531
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ib7ab94aada8a7cb80fe38f24daf32f9208c5b169
Reviewed-on: https://skia-review.googlesource.com/14826
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Many tests and examples use drawText with
a guess of how long the text is in bytes,
or a call to strlen(). Add a helper to
SkCanvas to simplify these examples.
Add another helper for SkString.
R=reed@google.com
Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2
Reviewed-on: https://skia-review.googlesource.com/13642
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Bug: skia:
Change-Id: I5f388760d43b19755b2767d95d32065f6d0f926e
Reviewed-on: https://skia-review.googlesource.com/14646
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit d4a338f4d0.
Reason for revert: Looks like I missed something I was supposed to delete in Android.
Original change's description:
> Delete copyTo(Allocator), hide copyTo() behind flag
>
> Replace uses of copyTo() in Skia.
>
> Bug: skia:6464
> Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
> Reviewed-on: https://skia-review.googlesource.com/14502
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=msarett@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e
Reviewed-on: https://skia-review.googlesource.com/14602
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
This reverts commit fdd77daedb.
Reason for revert: Apparently I have a few more build files to update before this can land.
Original change's description:
> Plumb the use of GrBackendRenderTarget throughout Skia
>
> Bug: skia:
> Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
> Reviewed-on: https://skia-review.googlesource.com/14148
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f
Reviewed-on: https://skia-review.googlesource.com/14531
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Replace uses of copyTo() in Skia.
Bug: skia:6464
Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
Reviewed-on: https://skia-review.googlesource.com/14502
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
wait_for(delta) is wait_until(steady_clock::now() + delta) under the
hood, so using wait_for() like this implies an extra call to now() that
we can avoid by using wait_until().
We can hoist that call out and just do it once... the past stays the past.
This is not super important. Just noticed while profiling. It's nice
to keep the overhead of the ok tool down so the real work can show. :)
Change-Id: I89d25a800b63ebcfc229b5b3aa3f2dd621f4e7b4
Reviewed-on: https://skia-review.googlesource.com/14480
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
We now will always use the system vulkan.h files whenever we are building
with vulkan. With non vulkan builds we use our checked in header to so
that we can get the needed symbols for compiling.
Bug: skia:
Change-Id: I352a3e007b33c575cefcfd6752db0b3b12b86a16
Reviewed-on: https://skia-review.googlesource.com/14270
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Also remove the feature of GrVkGpu that creates the instance/device if the client doesn't provide one.
Change-Id: Ie617313b6c684ed355333a475b80d0aae7e3a026
Reviewed-on: https://skia-review.googlesource.com/14261
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This (only?) affects ANGLE. Other ES platforms typically go through
EGLGLTestContext, which manually instantiates an EGLFenceSync.
In general, though, ES3 requires this API, so this is safe. Should give us
more accurate (and much less spammy) output from ES3 ANGLE performance
testing.
Bug: skia:
Change-Id: I10a608d21092aaffa4ab76e4b3d2f6e9c5cf09bb
Reviewed-on: https://skia-review.googlesource.com/14063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Currently the Vulkan backend is set up to always treat the "resolve"
target as the main VkImage in a render target and the msaa is a side cart
image. This makes it difficult to just wrap an msaa image that we don't own.
However, unlike GL the equivalent FBO 0 will never be multisampled so there
isn't much use for the functionality. Once we find a need for it we can find
a way to refactor to make it work.
Bug: skia:
Change-Id: I121e9c72a70c2a6f1aaddba2dbae19d8bddc3998
Reviewed-on: https://skia-review.googlesource.com/13980
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.
Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.
This is a reland of the reverted cl: https://skia-review.googlesource.com/13804
Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 3a3bc42b7d.
Reason for revert: still breaking android
Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
>
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
>
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
>
> This is a reupload of CL: https://skia-review.googlesource.com/13651
>
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
>
TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.
Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.
This is a reupload of CL: https://skia-review.googlesource.com/13651
Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit edbb7d8860.
Reason for revert: breaking android
Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
>
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
>
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
>
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This CL adds the GrBackend* classes as well as just updates the API for SkSurface and
SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will
be in an additional CL.
Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin,
samples, out of the descriptor and pass those in directly.
Bug: skia:
Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854
Reviewed-on: https://skia-review.googlesource.com/13122
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.
Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.
Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
A pair of coincident lines can generate multiple intersection
points. Path ops is more stable when the intersection T value
is used to recompute the intersection point, but this has
the side-effect of making integral edges intersect at non-integral
values.
While it's worthwhile to fix this, for the moment it is less
disruptive to only worry about keeping intersection values
integral if the original intersection point is integral in
both axes.
Also, fix some debugging code that bit-rotted.
R=msarett@google.com
Change-Id: Iefd27b25d1d21c22b224c174bd59bc6c105033c4
Reviewed-on: https://skia-review.googlesource.com/13721
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS
needs https://codereview.chromium.org/2820873002/# to land first
Bug: skia:6481
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Reviewed-on: https://skia-review.googlesource.com/13580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
-m, -s, and -w are now vias.
No real need to advertise -h given that if you just run ok with no
arguments it prints the help, but to be friendly accept -h and --help.
Change-Id: Id23936106cfea7d670cf0eb9773a5851055576f1
Reviewed-on: https://skia-review.googlesource.com/13254
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: I118fcd49990597d4dfea92efd3f9d99e52fdbfab
Reviewed-on: https://skia-review.googlesource.com/11481
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
replayClips has been disabled (broken) for a while.
This CL just attempts to hide the api (will remove
once android's callsite is removed)
Bug: skia:
Change-Id: I35b412addfc0a08ea888a62609888b9b54dce2a6
Reviewed-on: https://skia-review.googlesource.com/11401
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This makes the legacy code use GrProcessorSet::Analysis in the same manner as the non-GrLegacyMeshDrawOps which enables changes to how analysis works.
Change-Id: I8171e285ac8930beb3ac33cd3c4ee88f217b9e40
Reviewed-on: https://skia-review.googlesource.com/11205
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.
This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.
Bug: 658277
Change-Id: If4489ac3192dcf6f9996494c63821279721d0a12
Reviewed-on: https://skia-review.googlesource.com/11141
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Fixes:
- create temp api for android to pass nullptr
- don't release and access sk_sp<SkData> at the same time in parameters
This reverts commit b14131c185.
Bug: skia:
Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8
Reviewed-on: https://skia-review.googlesource.com/11129
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp.
The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline.
Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706
Reviewed-on: https://skia-review.googlesource.com/11002
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 9920b10f52.
Reason for revert: trying to get details on w2k failure
https://chromium-swarm.appspot.com/task?id=354345d34ba3b310&refresh=10
Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION, was running:
unit test HugeBlurImageFilter
unit test FontNames
unit test Codec_PngRoundTrip
unit test ClampRange
unit test FontHost
unit test ColorMatrixFilter
f16 image scaled_codec_premul abnormal.wbmp
565 image brd_android_codec_divisor_0.167 interlaced3.png_0.167
unit test Codec_png
unit test ImageFilterBlurLargeImage
unit test FontObj
unit test DrawText
unit test GrShape
565 image brd_android_codec_divisor_0.333 interlaced2.png_0.333
unit test PathOpsOpCubicsThreaded
unit test PathOpsOpLoopsThreaded
unit test FontMgr
unit test ColorToHSVRoundTrip
unit test Image_Serialize_Encoding_Failure
Likely culprit:
unit test Image_Serialize_Encoding_Failure
step returned non-zero exit code: -1073741819
Original change's description:
> Revert[2] "clean up (partially) colortable api""
>
> This reverts commit 1d1165ca65.
>
> Bug: skia:
> Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
> Reviewed-on: https://skia-review.googlesource.com/11024
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>
TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ia4e73434b083224baa36092c69526c2f59bb16aa
Reviewed-on: https://skia-review.googlesource.com/11025
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit d58f040532.
Reason for revert: tests/BlendTest is failing on the Nexus Player:
https://chromium-swarm.appspot.com/task?id=353ffc638e202210https://chromium-swarm.appspot.com/task?id=353ff5e35819ab10
Original change's description:
> Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
>
> Crurently, when preparing a texture for blitFramebuffer, we ignore the
> kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
> copy from one src rect to a different dst rect.
>
> This change updates initDescForDstCopy and setupDstTexture to allocate
> larger textures if necessary and accomodate this flags requirements.
>
> Bug: 658277
> Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609
> Reviewed-on: https://skia-review.googlesource.com/10941
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,ericrk@chromium.org,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I0fd6ca95bbc342f21978783b0103073179017795
Reviewed-on: https://skia-review.googlesource.com/11016
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.
This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.
Bug: 658277
Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609
Reviewed-on: https://skia-review.googlesource.com/10941
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 2e491a6a11.
Reason for revert: Windows unit tests failing?
Original change's description:
> clean up (partially) colortable api
>
> Needs this to land: https://codereview.chromium.org/2789853002/
>
> Bug: skia:
> Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7
> Reviewed-on: https://skia-review.googlesource.com/10600
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
>
TBR=msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I626e7edfcea82576a440dcaa851a04cedee6233f
Reviewed-on: https://skia-review.googlesource.com/10966
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit e0ff6ab272.
Reason for revert: a bunch of bots failed.
Original change's description:
> Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
>
> Crurently, when preparing a texture for blitFramebuffer, we ignore the
> kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
> copy from one src rect to a different dst rect.
>
> This change updates initDescForDstCopy and setupDstTexture to allocate
> larger textures if necessary and accomodate this flags requirements.
>
> Bug: 658277
> Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835
> Reviewed-on: https://skia-review.googlesource.com/10247
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,ericrk@chromium.org,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7fbd6c2652fe71c707d3120b035e0365fbc7fa66
Reviewed-on: https://skia-review.googlesource.com/10920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This refactors most features out of ok's core into vias:
-w --> a .png dumping via, "png", opening the door to other types
-m/-s --> a filtering via "filter"
Everything now can print a brief help message too.
Change-Id: I9e653aab98fd57182a6d458c7a80052130980284
Reviewed-on: https://skia-review.googlesource.com/10509
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.
This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.
Bug: 658277
Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835
Reviewed-on: https://skia-review.googlesource.com/10247
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Just as deferred and locked crash logging makes crashes easier to read,
so does deferred and locked failure logging make failures easier to read.
Change-Id: I71578d61b0056f8d7e692149762def1f155c0387
Reviewed-on: https://skia-review.googlesource.com/10280
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Didn't know what options would be useful here (path renderers?), so I've
left them default. Obviously we can thread them through TestSrc options.
I now have "841 ok" and no failures on my Linux laptop, though I imagine
the GPU tests are all just no-op'd by the TODO at the bottom of the file.
Change-Id: Id934c0bdb5de96d96f2a391106b5d20116f41979
Reviewed-on: https://skia-review.googlesource.com/10213
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Here's how things work now:
~/skia (tests)> ninja -C out ok; and out/ok test
ninja: Entering directory `out'
[2/2] link ok
112 ok../tests/TestConfigParsing.cpp:336
configs[i]->getBackend().equals(expectedConfigs[i].backend)
211 ok, 1 failed../tests/ShadowUtilsTest.cpp:25 Expected shadow
tessellation to fail but it did not.
../tests/ShadowUtilsTest.cpp:30 Expected shadow tessellation to fail but it did not.
../tests/ShadowUtilsTest.cpp:36 Expected shadow tessellation to fail but it did not.
../tests/ShadowUtilsTest.cpp:42 Expected shadow tessellation to fail but it did not.
637 ok, 2 failed
Change-Id: I84b108d4fabb538a2674831dd1ca64b149d7d265
Reviewed-on: https://skia-review.googlesource.com/10209
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Plenty TODO remaining.
This can actually kind of run without a test reporter or GrContext:
$ out/ok test
784 ok, 56 crashed
... lots of stack traces ...
Most tests don't use the reporter unless they're going to fail.
Change-Id: I7333e2c63ade5e671ebf60022d19390f1fc1c93a
Reviewed-on: https://skia-review.googlesource.com/10201
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Noticed all these while adding some unit test support to ok.
Change-Id: Ie33b96da95840628657211cb28b2134fd314a48a
Reviewed-on: https://skia-review.googlesource.com/10202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This is mostly a demo, and to make sure it's easy.
If I'm thinking right, other non-ct options should Just Work.
Change-Id: I295db0fa04921ccdd766e1870e367594ca802462
Reviewed-on: https://skia-review.googlesource.com/10190
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
lockf() is a simple way to prevent interlaced stack traces when there
are concurrent crashes. After a crashing process rethrows its signal
and dies for real, the OS unlocks the file for other processes.
I tested this by making SkCanvas::drawRRect() crash on Linux:
20-odd GM crashes with interlaced stack traces before, none after.
Change-Id: I99930756b8c85c552eef7c3a77778e4c00d34c42
Reviewed-on: https://skia-review.googlesource.com/10177
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This makes everything a lot more like DM, for the same reason:
it's the best way to make Vias work.
Instead of exposing a canvas, Dsts take a Src to draw. Vias still are
Dsts that wrap Dsts. They do their internal work in draw() then pass a
proxy Src encapsulating that work to the next Dst's draw().
A little refactoring in ok.cpp allows arbitrary chains of Vias.
I removed the guarantee that Src methods are called in strict order.
It's easy enough to make each Src initialize itself as needed.
I moved the .png encoding back to ok.cpp. It seemed weird for Dsts to
have to think about files and paths. One day Dst will want a data()
method for non-image output (.pdf, .skp), and then we'll want ok.cpp to
be the one to coordinate what to write where.
Change-Id: Id4a3674b2d05aef2b5f10e0077df0a8407c07b61
Reviewed-on: https://skia-review.googlesource.com/10175
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Not sure if these simple Src/Dst interfaces will last.
Vias are a little tricky, and some may be impossible.
Change-Id: I42d19b1ee74b51a830bb781f25a888c0b32ba98c
Reviewed-on: https://skia-review.googlesource.com/10174
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Now ok.cpp handles only the high level coordination of Srcs and Dsts,
without having to know or care what they are.
Some minor refactoring to things like Options.
Change-Id: I02df890b26d6d069e980a125b6a1ce1a7067b900
Reviewed-on: https://skia-review.googlesource.com/10173
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: I47ac01f0c2c0f2f7b925de09c18d3c8265398c8a
Reviewed-on: https://skia-review.googlesource.com/10117
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
BUG=skia:
Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e
Reviewed-on: https://skia-review.googlesource.com/10105
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: If752152daabcdb7420fd13863fea4ce49f725aab
Reviewed-on: https://skia-review.googlesource.com/10108
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The 'dont_clip_to_layer' GM does not balance its layers. It calls
saveLayer() 3x but restore() only 2x. This may be a bug in the GM
itself, but I'm not sure so I haven't changed it here.
If ok is writing .pngs, the surface passes ownership of its buffer to an
image snapshot, simply marking it as immutable. Then, when the surface
is destroyed later, it destroys its inner canvas, which restores its
save stack to zero, actually doing some drawing in the case of
unbalanced saveLayer()s. We then call notifyPixelsChanged() and hit an
assert saying "you just wrote some pixels but this buffer was marked
immutable."
DM doesn't show this problem because it's doesn't really use surfaces
and images, just bitmaps. There's no ownership handoff and nothing is
ever immutable, so the condition triggering the assert never comes up.
I'm not really sure where we want to say is the bug:
- SkCanvas can draw in its destructor?
- SkSurface doesn't restore to zero before snapping an image?
- that dont_clip_to_layer should call restore three times?
In any case, this guards against it in ok.
I was using this as a convenient crash to help figure out how to best
save and print stack traces, but now that I've got that worked out we
might as well fix this.
Change-Id: Id6d397f534dd1b50219e0d3078c989a4910883a6
Reviewed-on: https://skia-review.googlesource.com/10140
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This seems to work pretty nicely for each engine in the expected case of
few crashes. The serial and thread engines just dump the first crash
stack to stderr before dying, while the fork engine saves all crashes to
a temporary file, then prints that to stderr once everything's finished.
I'm not sold on this TLS solution as being the best way to know what
was running when we crashed, but it's better than printing nothing.
Change-Id: I0aca66529301b1ad9bd51ec728848817586c606d
Reviewed-on: https://skia-review.googlesource.com/10102
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This runs much faster. Very good idea.
Change-Id: I088aa9588c069a17e4745be55c2397114ee8a2bc
Reviewed-on: https://skia-review.googlesource.com/10053
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: I9d01656a9d9b7aa3ab352dd4c168b26da620a903
Reviewed-on: https://skia-review.googlesource.com/9978
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This silences a new warning in clang 5.0
Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8
Reviewed-on: https://skia-review.googlesource.com/10006
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
* Translate to python, use multiprocessing to make it wun in reasonanble time.
* Fix three headers.
* Move one header.
Change-Id: I0b26f912bb8086ec158d1c0bae76b923ec6121a4
Reviewed-on: https://skia-review.googlesource.com/8490
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
BUG=skia:
Change-Id: I053cce7c05c74860cbace00cd94ea4b96e9a482c
Reviewed-on: https://skia-review.googlesource.com/9889
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Allow evaluation choice of Lazy or Eager evaluation for SkDeferredCanvas.
Eager is used for drawing to a non-recording canvas to reduce the number of
all operations.
Lazy is used for drawing to a recording canvas to reduce the amount decode/encode
that happens.
R=reed@google.com
Change-Id: I7837c4f6e5911c153e0796162e1170edbc34839e
Reviewed-on: https://skia-review.googlesource.com/9839
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
The current code creates an SkFILEStream and then reads all the bytes
from it into an SkData. Instead, let the SkData just mmap the file.
Change-Id: I79e3550a84e6f54ccbbd7284f5cda81ce1fa9221
Reviewed-on: https://skia-review.googlesource.com/9877
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This changes the names of several shorthand names for gpu configs to be prefixed either with "gl" or "gles" and makes the bots only use such configs. It adds some missing named configs.
Change-Id: Iea4e0e2ddafe0ac08e623111a15be7335156957c
Reviewed-on: https://skia-review.googlesource.com/9833
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
BUG=skia:
Change-Id: I03a8a1b1ed9bd2483ddd8e231ba54dc10753b454
Reviewed-on: https://skia-review.googlesource.com/9836
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The fix was to release the array of vertices in the picturerecorder
destructor (where we also release textblobs etc.
This reverts commit 1eb3fef136.
BUG=skia:
Change-Id: I3bf4acd6ad209205b0832a3cb7f94cd89dfcefc5
Reviewed-on: https://skia-review.googlesource.com/9826
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 14583e11fd.
Reason for revert: leaking
Direct leak of 499104 byte(s) in 2112 object(s) allocated from:
#0 0x1e195f0 in operator new(unsigned long) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x1e195f0)
#1 0x3142b0a in SkVertices::Builder::init(SkCanvas::VertexMode, int, int, SkVertices::Sizes const&) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x3142b0a)
Original change's description:
> More SkVertices implementation work
>
> - change virtuals to take const SkVertices*, as we do for TextBobs and Images
> - override onDrawVerticesObject in recording canvases
> - deserialize raw-vertices into SkVertices object
>
> Possibly a follow-on would intercept the raw-form directly in canvas,
> and remove the virtual, and only support the object form.
>
> BUG=skia:6366
>
> Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
> Reviewed-on: https://skia-review.googlesource.com/9633
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366
Change-Id: I40bb7a20698ef6aa0a9ef71a3d6ac4c1473e081c
Reviewed-on: https://skia-review.googlesource.com/9825
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
- change virtuals to take const SkVertices*, as we do for TextBobs and Images
- override onDrawVerticesObject in recording canvases
- deserialize raw-vertices into SkVertices object
Possibly a follow-on would intercept the raw-form directly in canvas,
and remove the virtual, and only support the object form.
BUG=skia:6366
Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
Reviewed-on: https://skia-review.googlesource.com/9633
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Also disables use of small distance fields in Android framework.
Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868
Reviewed-on: https://skia-review.googlesource.com/9731
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Also avoid asserting when untagged images are being transformed.
BUG=skia:
Change-Id: If712f39b5f588b2bc3dc318a5b782badb7662ccf
Reviewed-on: https://skia-review.googlesource.com/9695
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We never adopt render targets (just borrow them).
BUG=skia:
Change-Id: Ie899b814a7a81339a8735bbd7ad9facc66e580d7
Reviewed-on: https://skia-review.googlesource.com/9525
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.
Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d
Reviewed-on: https://skia-review.googlesource.com/9488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.
Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
On Windows, we need to reconstruct the window to allow setting a new
pixel format with a different sample count.
Added some code that maintains window size/position across these changes.
Previously, just cycling through backends would cause the window to move,
as the "default" position would cycle across the screen. Now it's pinned.
BUG=skia:
Change-Id: Iecbe7a490577382043ffe5a88c910b4c0be2ed5c
Reviewed-on: https://skia-review.googlesource.com/9085
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 91b961d33d.
Reason for revert: need to update caller in android
Original change's description:
> remove SkClipVisitor
>
> With new device clipping, this is unsupported on SkCanvas
>
> BUG=skia:
>
> Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
> Reviewed-on: https://skia-review.googlesource.com/9349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: I22df0c66ec564ca32355179d2ee5ea14bff7b1d5
Reviewed-on: https://skia-review.googlesource.com/9456
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Eliminates a UI oddity on Windows when cycling through backends.
BUG=skia:
Change-Id: I83f0325054def80bb9b6e5a9886461f8aad215ae
Reviewed-on: https://skia-review.googlesource.com/9453
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
BUG=skia:
Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce
Reviewed-on: https://skia-review.googlesource.com/9398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Previously this could only be turned on at runtime.
Change-Id: I1b626584fba17fcf8ff64135dd93f98c7f40821d
Reviewed-on: https://skia-review.googlesource.com/9445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
With new device clipping, this is unsupported on SkCanvas
BUG=skia:
Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
Reviewed-on: https://skia-review.googlesource.com/9349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is to support the preFlush callbacks
Change-Id: I8513ea08b6516681566eceafa789b2ee7925ebce
Reviewed-on: https://skia-review.googlesource.com/9199
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I0cc82fe826b81a082b579f60af3d9ef35d5fe351
Reviewed-on: https://skia-review.googlesource.com/9407
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
BUG=skia:
Change-Id: I42674abfb7ee764f676100ac0e84cc0f07620bec
Reviewed-on: https://skia-review.googlesource.com/9396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Previous failure was failure to detect that the clip wasn't wide-open when
optimizing for retain-vs-discard in copy-on-write. gm:copy_on_write_retain
detected this. Now fixed by adding new method to SkBaseDevice.h
This reverts commit 27d07f0acb.
BUG=skia:6214
Change-Id: I532d16ec075a4525c2a550b1157bcec695dd8efd
Reviewed-on: https://skia-review.googlesource.com/9341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
This is currently done in GrOpList. However, it can trigger resource creation, which in turn can trigger a flush. In the future flushing may destroy the op list.
Change-Id: I21cb1e10060bf31c95431c0511fcfff637cd6498
Reviewed-on: https://skia-review.googlesource.com/9304
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
BUG=skia:6242
Change-Id: I696de8eac61aebaf5cb07d8874bde3c7bd470277
Reviewed-on: https://skia-review.googlesource.com/9299
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Combine texture provider and resource provider
Largely mechanical. Only three places that were calling createApprox
via texture provider (ie without flags), so that was simple.
BUG=skia:
Change-Id: I876367bcdc6a8db736deedab1028de1972015509
Reviewed-on: https://skia-review.googlesource.com/9176
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit c77e33f73d.
Reason for revert: breaks isClipRect
- this CL inspected the conservative clip for this, which is (by definition) a rect
- probably need to query the device for this info
Original change's description:
> Remove SkDraw from device-draw methods, and enable device-centric clipping.
>
> BUG=skia:6214
>
> Change-Id: I593900724310d09133ae4791ef68d38c43762fc2
> Reviewed-on: https://skia-review.googlesource.com/8806
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>
TBR=bsalomon@google.com,halcanary@google.com,msarett@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6214
Change-Id: I9090cbbb9f45b2dd204d9fdc187de2ff714b93f6
Reviewed-on: https://skia-review.googlesource.com/9172
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
BUG=skia:
Change-Id: Ief7516c1505f8e447f83121ed4ba75b9fa9ba75b
Reviewed-on: https://skia-review.googlesource.com/8976
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
BUG=skia:
Change-Id: I4324b65bc50a3dfd90372459899870d5f1952fdc
Reviewed-on: https://skia-review.googlesource.com/9120
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
BUG=skia:
Change-Id: I248ba081f0229d7fcf2071009076acc88b80b076
Reviewed-on: https://skia-review.googlesource.com/9088
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These values were left uninitialized, leading to problems with the GUI
in raster configs.
BUG=skia:
Change-Id: Ia8c16112e53b74daf66941d2923327c9732cf432
Reviewed-on: https://skia-review.googlesource.com/9114
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
I was getting sporadic failures from XInitImage (causing the raster
backend to not draw anything).
BUG=skia:
Change-Id: Ied79f2b5354d89c146aca64d70fde8cf9f3ab62e
Reviewed-on: https://skia-review.googlesource.com/9102
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
BUG=skia:
Change-Id: I3314013538792c2aa82cc49f3f072aab2cdc4a55
Reviewed-on: https://skia-review.googlesource.com/9079
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.
SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.
Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.
Re-land of https://skia-review.googlesource.com/c/8529/
BUG=skia:
Change-Id: I48ebd57d1ea0cfd3a1db10c475f2903afb821966
Reviewed-on: https://skia-review.googlesource.com/8960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>