Commit Graph

21562 Commits

Author SHA1 Message Date
halcanary
9d524f22bf Style bikeshed - remove extraneous whitespace
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002

Review URL: https://codereview.chromium.org/1842753002
2016-03-29 09:03:53 -07:00
kjlubick
e577693b3b Prevent waiting for charge twice
BUG=skia:5111
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1840003002

Review URL: https://codereview.chromium.org/1840003002
2016-03-29 05:50:41 -07:00
bsalomon
7888de0db7 Fix GrConvexPolyEffect to deal with line paths.
BUG=skia:4727
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1839743002

Review URL: https://codereview.chromium.org/1839743002
2016-03-28 15:04:45 -07:00
msarett
5cd0ed38ab Delete SkImageDecoder_empty
We no longer need this now that the Chrome build files have been
updated to use SkImageEncoder_none (which is an identical file).

TBR=djsollen@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832363002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1832363002
2016-03-28 13:57:10 -07:00
benjaminwagner
af3b35ec35 Remove GLFW from public.bzl.
Added in https://codereview.chromium.org/1842463002

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

Review URL: https://codereview.chromium.org/1835363002
2016-03-28 13:27:28 -07:00
robertphillips
5ff17b1352 Swap SkPictureImageFilter's factories over to smart pointers
A trial balloon before converting the rest

This requires https://codereview.chromium.org/1836443003/ (add SK_SUPPORT_LEGACY_IMAGEFILTER_PTR flag for future skia CL) to land in Chromium first
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1831323003

Review URL: https://codereview.chromium.org/1831323003
2016-03-28 13:13:42 -07:00
mtklein
02b2f1900d We meant these to be YES... sigh.
This will dramatically improve link times with XCode 7.3.

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

Review URL: https://codereview.chromium.org/1835303003
2016-03-28 12:43:39 -07:00
egdaniel
af132770a9 Change VkPipelineStateCahce to use Hash and LRU LList.
This simplifies the caching code and forms the base for a caching template
that will be easier to use for other objects within Vulkan.

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

Review URL: https://codereview.chromium.org/1836863002
2016-03-28 12:39:29 -07:00
bsalomon
dec294375a Remove the GrGLInterface callback mechanism.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1836013002

Review URL: https://codereview.chromium.org/1836013002
2016-03-28 12:25:09 -07:00
benjaminwagner
e0d62a5177 Remove advance[XY]Fixed getters.
Reverts https://codereview.chromium.org/1772863002 after updating Android.

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

Review URL: https://codereview.chromium.org/1842453002
2016-03-28 12:25:04 -07:00
egdaniel
c5ec140829 Use NV glsl shader compiler for Vulkan
The nvidia direct glsl shader compiler seems to perform much better than using
shaderc to compile to spir-v first.

This change also includes a change to prefer host cached memory for buffers.
Having cached buffers signifcantly improves performance whenever we need to do
buffer reads and writes.

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

Review URL: https://codereview.chromium.org/1835813003
2016-03-28 12:14:43 -07:00
halcanary
2be7e01382 SkPDF: PDFDevice::ContentEntry now implemented with SinglyLinkedList
add SkSinglyLinkedList<T> class

no change in SkPDF output.

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

Review URL: https://codereview.chromium.org/1839633003
2016-03-28 11:58:08 -07:00
abarth
7fb19bc229 Add GLFW support for GrGLCreateNativeInterface
This file lets us use Skia's GPU backend with GLFW.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1827153003
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1827153003
2016-03-28 11:34:27 -07:00
bungeman
df801aac5f Remove SK_IGNORE_MAC_FONT_WEIGHT_FIX.
This is now a dead define, and the changes have been rebased in both
Skia gold and Blink layout tests.

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

Review URL: https://codereview.chromium.org/1837783002
2016-03-28 11:24:04 -07:00
robertphillips
090b7629da Temporary fix for --preAbandonGpuContext bug
In this instance what is going wrong is:
  the context gets abandoned
  SkCanvas tries to create a new SkGpuDevice (which fails)
  if then creates a bitmap device
  it then attempts to draw the abandoned GrTexture (behind the old SkGpuDevice into the new bitmap device with an image filter
  b.c. some image filters still switch their behavior based on the presence of a texture bad stuff happens

This used to be resolved by the new bitmap device getting forced down the bitmap path and then failing when it attempted to readback the GrTexture.

BUG=skia:5138

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

Review URL: https://codereview.chromium.org/1840663002
2016-03-28 11:07:43 -07:00
benjaminwagner
dfed06f6ff Make SkFixed private.
Removed from Chromium in https://codereview.chromium.org/1698083004 and https://codereview.chromium.org/1752953003.

Removed from Android in 895781.

Removed from Google3 in internal cl/118359061.

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

Review URL: https://codereview.chromium.org/1839653002
2016-03-28 10:32:06 -07:00
rmistry
8ce5912fe3 Skip toolchain downloads for a few android tools.
This is an attempt to avoid downloading the android toolchain when not required.
I went through all binaries listed in https://code.google.com/p/chromium/codesearch#chromium/build/scripts/slave/recipe_modules/skia/android_flavor.py except for android_ninja.

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

Review URL: https://codereview.chromium.org/1832883002
2016-03-28 09:35:41 -07:00
halcanary
c61edcc2b8 rm src/ports/SkTime_*.cpp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1833283002

Review URL: https://codereview.chromium.org/1833283002
2016-03-28 09:00:22 -07:00
halcanary
b8fb9934a0 SkPDF s/SkAutoTDelete/std::unique_ptr/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1837553002

Review URL: https://codereview.chromium.org/1837553002
2016-03-28 07:58:30 -07:00
jvanverth
e50f3e7539 Add WSI functions to GrVkInterface
BUG=skia:5043
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834903003

Review URL: https://codereview.chromium.org/1834903003
2016-03-28 07:03:06 -07:00
update-skps
6d37635636 Update SKP version
Automatic commit by the RecreateSKPs bot.

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

Review URL: https://codereview.chromium.org/1835193002
2016-03-27 00:30:19 -07:00
Brian Salomon
92271fc314 Don't crash when resource path is omitted
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1840573004

Review URL: https://codereview.chromium.org/1840573004 .
2016-03-25 21:38:09 -04:00
halcanary
fdc88b5aa6 rm src/animator/SkTime.cpp
It was empty anyway.

Review URL: https://codereview.chromium.org/1835073002
2016-03-25 15:22:47 -07:00
halcanary
73557f6c3f SkPDF: remove margin foolishness
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1837453003

Review URL: https://codereview.chromium.org/1837453003
2016-03-25 14:44:33 -07:00
Brian Salomon
d2100f20a9 Don't crash when resource path isn't specified
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838583002
BUG=skia:

Review URL: https://codereview.chromium.org/1838583002 .
2016-03-25 17:02:20 -04:00
benjaminwagner
2176f75b06 Remove Sk48Dot16. No longer used.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1831303003

Review URL: https://codereview.chromium.org/1831303003
2016-03-25 13:41:38 -07:00
brianosman
eb3429c6cd Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU builder fails when it sees Index8 (among other things), so change the code to fallback to GPU in that case. Additionally, if we're going to be mipping an sRGB image, don't use the CPU code (which is not yet gamma correct). Unfortunately, this means that we will often be using the GPU path, still - with recent codec changes, most images are coming in tagged as sRGB.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835003002

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

Review URL: https://codereview.chromium.org/1835003002
2016-03-25 13:03:03 -07:00
benjaminwagner
ec4d4d784d Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow.
The following are currently unused in Android, Google3, Chromium, and Mozilla:
  - SkEvent
  - SkTime::GetMSecs
  - SK_TIME_FACTOR (also unused in Skia)
  - SkAutoTime

I left uses of SkMSec more-or-less intact for SkEvent, SkAnimator, and SkInterpolator. SkInterpolator is used in Chromium, so I did not want to change the API. The views/ and animator/ code is crufty, so it didn't seem worthwhile to refactor it. Instead, I added SkEvent::GetMSecsSinceStartup, which is likely to be adequate for use in SampleApp.

I also left SkMSec where it is used to measure a duration rather than a timestamp. With the exception of SkMovie, which is used in Android, all of the uses appear to measure the execution time of a piece of code, which I would hope does not exceed 2^31 milliseconds.

Added skiatest::Timer to support a common idiom in tests where we want to measure the wallclock time in integer milliseconds. (Not used in tests/PathOpsSkpClipTest.cpp because it redefines things in Test.h.)

Removed tabs in tests/StrokerTest.cpp.

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

Review URL: https://codereview.chromium.org/1811613004
2016-03-25 12:59:53 -07:00
brianosman
9cf31f40fb SkMipMap::Build supports 1xN and Nx1 inputs, so remove the special case from the test harness. Update a no-longer-correct comment.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1831983003

Review URL: https://codereview.chromium.org/1831983003
2016-03-25 12:55:52 -07:00
cdalton
397536cabe Consolidate GPU buffer implementations
Consolidates all the different buffer implementations into a single
GrBuffer class. This will allow us to add new buffer types, use DSA in
OpenGL, track buffer bindings by unique ID, cache buffers without
respect to the type of data they have been used for previously, etc.
This change is strictly a refactor; it introduces no change in
functionality.

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

Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f

Review URL: https://codereview.chromium.org/1825393002
2016-03-25 12:15:03 -07:00
msarett
dd26a3ba0a Compile default SkMovie on cmake
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835033002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1835033002
2016-03-25 12:13:17 -07:00
scroggo
77899d1220 Move SkRWBuffer.h to include/ and add SK_API
Needed for use in Blink in crrev.com/1812273003
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838463003

Review URL: https://codereview.chromium.org/1838463003
2016-03-25 12:00:15 -07:00
halcanary
a50151dcb5 SkPDF: draw{Image,Bitmap} always serializes early
Before this change, the PDFCanon held a map from BitmapKeys
to SkImages for de-duping bitmaps.  Even if the PDFDocument
serialized images early, the Canon still held a ref to that
image inside the map.  With this change, the Canon holds a
single map from BitmapKeys to PDFObjects.  Now, Images are
only held by the PDFObject, which the document serializes
and drops early.

This change also:

-   Moves SkBitmapKey into its own header (for possible
    reuse); it now can operate with images as well as
    bitmaps.

-   Creates SkImageBitmap, which wraps a pointer to a bitmap
    or an image and abstracts out some common tasks so that
    drawBitmap and drawImage behave the same.

-   Modifies SkPDFCreateBitmapObject to take and return a
    sk_sp<T>, not a T*.

-   Refactors SkPDFDevice::internalDrawImage to use bitmaps
    or images (via a SkImageBitmap).

-   Turns on pre-serialization of all images.

BUG=skia:5087

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

Review URL: https://codereview.chromium.org/1829693002
2016-03-25 11:57:49 -07:00
brianosman
b3c9e4faaa Revert of Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU bu… (patchset #1 id:1 of https://codereview.chromium.org/1835003002/ )
Reason for revert:
Speculative - seems likely to be the results of nanobench crashes on several bots.

Original issue's description:
> Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU builder fails when it sees Index8 (among other things), so change the code to fallback to GPU in that case. Additionally, if we're going to be mipping an sRGB image, don't use the CPU code (which is not yet gamma correct). Unfortunately, this means that we will often be using the GPU path, still - with recent codec changes, most images are coming in tagged as sRGB.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835003002
>
> Committed: https://skia.googlesource.com/skia/+/b0ac1af7fab467aacbc27d20d14a09bcb960472f

TBR=reed@google.com,bsalomon@google.com,cblume@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1836563002
2016-03-25 11:54:32 -07:00
halcanary
d096459b2b experimental/fiddle: update to work again
NOTRY=true

Review URL: https://codereview.chromium.org/1834993003
2016-03-25 11:29:34 -07:00
brianosman
b0ac1af7fa Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU builder fails when it sees Index8 (among other things), so change the code to fallback to GPU in that case. Additionally, if we're going to be mipping an sRGB image, don't use the CPU code (which is not yet gamma correct). Unfortunately, this means that we will often be using the GPU path, still - with recent codec changes, most images are coming in tagged as sRGB.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835003002

Review URL: https://codereview.chromium.org/1835003002
2016-03-25 11:26:26 -07:00
benjaminwagner
77a9cc1dea Don't convert to Sk48Dot16 in DrawOneGlyph.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1831983002

Review URL: https://codereview.chromium.org/1831983002
2016-03-25 11:24:30 -07:00
msarett
d442d32335 Remove extra definitions of SkMovie
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1830343004

Review URL: https://codereview.chromium.org/1830343004
2016-03-25 11:08:14 -07:00
ethannicholas
384b5e9cd3 got Vulkan compiling on Linux again
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834953003

Review URL: https://codereview.chromium.org/1834953003
2016-03-25 11:04:06 -07:00
msarett
151425779f Delete SkPageFlipper
BUG=skia:5132
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832083002

Review URL: https://codereview.chromium.org/1832083002
2016-03-25 10:31:22 -07:00
robertphillips
ff6595286c Turn off Discardable scaled image cache
This change accidentally slipped into the checked in version of https://codereview.chromium.org/1785643003/ (Switch SkBlurImageFilter over to new onFilterImage interface). It is the reason why we're seeing performance improvements on Android and Ubuntu for the ugamsolutions skp (and others).

I guess the real question is, since it isn't crashing, do we want to leave it enabled?

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

Review URL: https://codereview.chromium.org/1835563002
2016-03-25 09:48:45 -07:00
kjlubick
face88a8ce Forward serial (fixes charging)
NOTRY=true
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832103002

Review URL: https://codereview.chromium.org/1832103002
2016-03-25 09:47:55 -07:00
ethannicholas
28ef445d2e added support for glMinSampleShading
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812223002

Review URL: https://codereview.chromium.org/1812223002
2016-03-25 09:26:03 -07:00
mtklein
5443f1b6ba Fix typo in SkTLazy copy ctor. src is a reference, not a pointer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832053003

Review URL: https://codereview.chromium.org/1832053003
2016-03-25 09:11:35 -07:00
reed
fe63045f07 move setshader to sk_sp, re-using SK_SUPPORT_LEGACY_CREATESHADER_PTR
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829303002

Review URL: https://codereview.chromium.org/1829303002
2016-03-25 09:08:00 -07:00
marco.diiga
cce4927112 [CMake fixes] Linux X11 pixel format and Windows compilation fix
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835573002

Review URL: https://codereview.chromium.org/1835573002
2016-03-25 09:01:26 -07:00
msarett
c1d0312b22 Rename encoders to Sk*ImageEncoder
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1836493002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1836493002
2016-03-25 08:58:55 -07:00
robertphillips
587ea71a52 Fix old debugger for sk_sp changes
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1827403002

Review URL: https://codereview.chromium.org/1827403002
2016-03-25 07:04:35 -07:00
jvanverth
fd7bd45ac2 Revise layer, extension and feature setup for Vulkan
Moves all the extension setup logic into GrVkBackendContext, and
pass extension and feature information to Skia via flags. Also adds
version information to GrVkBackendContext.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832613003
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1832613003
2016-03-25 06:29:52 -07:00
brianosman
64d094d775 Require sRGB write control for sRGB support. Add flag to GrPaint to suppress linear -> sRGB conversion on write. Use that to fix YUV conversion, which directly produces sRGB data. (Technically, it produces data in whatever the color space of the JPEG might be).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1830303002

Review URL: https://codereview.chromium.org/1830303002
2016-03-25 06:01:59 -07:00