Commit Graph

1886 Commits

Author SHA1 Message Date
halcanary
4dbbd04314 SkLeanWindows.h: #include "Windows.h" fewer places
$ git grep -l '<windows.h>' include src
    include/private/SkLeanWindows.h

    $ git grep -l SkLeanWindows.h | grep '\.h$'
    include/ports/SkTypeface_win.h
    include/utils/win/SkHRESULT.h
    include/utils/win/SkTScopedComPtr.h
    include/views/SkEvent.h
    src/core/SkMathPriv.h
    src/ports/SkTypeface_win_dw.h
    src/utils/SkThreadUtils_win.h
    src/utils/win/SkWGL.h

The same for  `#include <intrin.h>` that was found in SkMath.h.
Those functions that needed it are moved to SkMathPriv.h.

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

CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng

Review-Url: https://codereview.chromium.org/2041943002
2016-06-07 17:21:10 -07:00
liyuqian
d94ad5823b Implement Raster Backend on Android Viewer App
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041193004

Review-Url: https://codereview.chromium.org/2041193004
2016-06-07 14:22:38 -07:00
liyuqian
1f508fd0fe Show FPS in UI state
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043793002

Review-Url: https://codereview.chromium.org/2043793002
2016-06-07 06:57:40 -07:00
jvanverth
814e38d5c1 Use intptr_t for onTouch argument.
On 64-bit platforms, casting int to void* is not valid.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2047443002

Review-Url: https://codereview.chromium.org/2047443002
2016-06-06 08:48:47 -07:00
liyuqian
38d1adf1f7 Allow animation in Android viewer
To do that, we let ALooper_pollAll return immediately rather than wait indefinitely.

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

Review-Url: https://codereview.chromium.org/2031383002
2016-06-06 07:53:24 -07:00
robertphillips
55fdcccf01 Remove GrRenderTarget from GrPipelineBuilder
This used to be "Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder"

but has been split into:
https://codereview.chromium.org/1993263002/ (Make GrAppliedClip friendless)
https://codereview.chromium.org/1997773002/ (Retract GrRenderTarget from GLProgramsTest)
https://codereview.chromium.org/1993403002/ (GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext))
https://codereview.chromium.org/2004433002/ (Retract GrRenderTarget from GrTestTarget)
https://codereview.chromium.org/2015333002/ (Change parameters to GrPipelineBuilder's ctor)
https://codereview.chromium.org/2035823002/ (Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack)

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

Review-Url: https://codereview.chromium.org/1988923002
2016-06-06 06:16:21 -07:00
robertphillips
976f5f0dc5 Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack
This will be followed up with a CL to remove the GrRenderTarget from the GrPipelineBuilder.

Split out of:
https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

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

Review-Url: https://codereview.chromium.org/2035823002
2016-06-03 10:59:20 -07:00
liyuqian
b73c24b01a Add Softkey UIState to Viewer
We can use this to simulate any key/command on Android UI.

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

Review-Url: https://codereview.chromium.org/2035923002
2016-06-03 08:47:24 -07:00
jcgregorio
34604046cf skiaserve: Add a flag to control hosted mode, i.e. when running on debugger.skia.org.
BUG=skia:
TBR=ethannicholas@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2036173002

Review-Url: https://codereview.chromium.org/2036173002
2016-06-03 07:26:22 -07:00
borenet
9d19cc6ca4 Add Android device type for NVIDIA Shield
BUG=skia:5185
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2036183003

Review-Url: https://codereview.chromium.org/2036183003
2016-06-03 07:01:32 -07:00
liyuqian
6cb7025182 Implement OpenGL backend in Android viewer app
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2032623002

Review-Url: https://codereview.chromium.org/2032623002
2016-06-02 12:16:25 -07:00
jvanverth
1e305ba0d6 Add offset to memory allocations
This is setting up for suballocations within one large
allocation

BUG=skia:5031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018933004
TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2018933004
2016-06-01 09:39:15 -07:00
kulshin
c4b091543b Implement support for rendering color emoji on Windows
This change adds support to the DirectWrite scaler context
for detection of color fonts. If it detects a color font and
the glyph is a color glyph, it will use DirectWrite's
TranslateColorGlyphRun API and generate an image of the
glyph that can then be rendered.

Chromium tests: https://codereview.chromium.org/2003853002

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

Review-Url: https://codereview.chromium.org/1984943002
2016-06-01 08:31:28 -07:00
jcgregorio
ce8ea4c55b skiaserve: Add /quitquitquit handler. Will be used in the hosted debugger.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023023002
TBR=ethannicholas

Review-Url: https://codereview.chromium.org/2023023002
2016-05-31 12:51:31 -07:00
mboc
ee6a9919a3 SkTypeface::MakeFromName to take SkFontStyle.
SkTypeface::MakeFromName currently takes SkTypeface::Style,
which is quite limited. This starts the transition to this
function taking SkFontStyle instead.

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

TBR=reed
He said it sounded like a good idea.

Review-Url: https://codereview.chromium.org/1818043002
2016-05-31 11:42:37 -07:00
jvanverth
99eb6e2d5a Add missing files for GL unix viewer.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023943004

Review-Url: https://codereview.chromium.org/2023943004
2016-05-31 09:39:20 -07:00
msarett
97205a4b41 Add interesting features to visualize_color_gamut
(1) Draw triangles onto a D50 color gamut so they are
    actually in the correct place.
(2) Add options to display canonical sRGB and Adobe RGB
    gamuts.
(3) Label the R, G, and B points of the color gamut.
(4) Decode and reencode the input image without color
    correction, so we can compare to the corrected version.

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

Review-Url: https://codereview.chromium.org/2017153002
2016-05-27 14:01:02 -07:00
herb
ca1ec03c5c Move forceSRGB to SkCommonFlags.
This fixes a duplicate symbol problem with the iOS build.

Add common forceSRGB flag.

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

Review-Url: https://codereview.chromium.org/2019073002
2016-05-27 10:57:58 -07:00
liyuqian
e5a6cd9832 Now we can use drawer to view the state information of the native app, and set its state using the spinner.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004633002

Committed: https://skia.googlesource.com/skia/+/4e4e30823fba0047b93a56bfcf05c04ca57e82ec

Review-Url: https://codereview.chromium.org/2004633002
2016-05-27 08:52:52 -07:00
jvanverth
85f758c334 Add OpenGL support to Linux viewer
Also adds a command line option (--vulkan) to choose between
Vulkan and OpenGL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003

Committed: https://skia.googlesource.com/skia/+/10b3815a11c39b154ec7b74a2af43e019b50d48c

Review-Url: https://codereview.chromium.org/2011473003
2016-05-27 06:47:08 -07:00
kjlubick
9ad0949338 Revert of Add drawer with state information (patchset #8 id:140001 of https://codereview.chromium.org/2004633002/ )
Reason for revert:
Broke Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan.  See https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan/builds/134/steps/compile_skia%20on%20Ubuntu/logs/stdio.

Original issue's description:
> Now we can use drawer to view the state information of the native app, and set its state using the spinner.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004633002
>
> Committed: https://skia.googlesource.com/skia/+/4e4e30823fba0047b93a56bfcf05c04ca57e82ec

TBR=djsollen@google.com,jvanverth@google.com,liyuqian@google.com
# 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/2016343002
2016-05-27 06:22:01 -07:00
kjlubick
0248bfd8d2 Revert of Add OpenGL support to Linux viewer (patchset #5 id:80001 of https://codereview.chromium.org/2011473003/ )
Reason for revert:
Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan is broken and this patch prevents the revert of the culprit

Original issue's description:
> Add OpenGL support to Linux viewer
>
> Also adds a command line option (--vulkan) to choose between
> Vulkan and OpenGL.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003
>
> Committed: https://skia.googlesource.com/skia/+/10b3815a11c39b154ec7b74a2af43e019b50d48c

TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com,jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2015213002
2016-05-27 06:20:10 -07:00
jvanverth
10b3815a11 Add OpenGL support to Linux viewer
Also adds a command line option (--vulkan) to choose between
Vulkan and OpenGL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003

Review-Url: https://codereview.chromium.org/2011473003
2016-05-27 05:47:00 -07:00
djsollen
4145792736 Remove VisualBench and its Android implementation.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018603003

Review-Url: https://codereview.chromium.org/2018603003
2016-05-27 05:39:29 -07:00
liyuqian
4e4e30823f Now we can use drawer to view the state information of the native app, and set its state using the spinner.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004633002

Review-Url: https://codereview.chromium.org/2004633002
2016-05-26 12:43:43 -07:00
borenet
649becde3b Temporarily change GalaxyS3 product.board
Swarming detects this as "m0" for some reason. Change our requested
dimension until this is fixed.

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

Review-Url: https://codereview.chromium.org/2018513004
2016-05-26 11:21:02 -07:00
caryclark
2bec26a716 fix security bug
This fix is a tradeoff. It changes intersection to
treat a case where one coincident run is intersected at one point
and the other edge is not as continuing to be a span.

The old code tried to treat this as a single point.
The old code is probably right, but this change alone
made the data structures inconsistent. Later, extending
the coincident runs would fail by incorrectly discarding
the single point intersection.

As a result, this fixes the security test and one other, but
makes a different test fail. Isolating the failure uncovered
a reduced case that fails with and without the change, so
there are more serious problems here. Those problems are
addressed in a separate CL.

Many of the test edits below remove ill-thought out debugging
messaging that fire off global state, which isn't usable
in a multi-threaded test environment.

In the end, with this fix, all existing tests (modulo one
new failure and one new non-failure) pass in debug and
in the extended release test suites.

TBR=reed@google.com
BUG=614248
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018513003

Review-Url: https://codereview.chromium.org/2018513003
2016-05-26 09:01:47 -07:00
scroggo
23b80c402a Revert of Blacklist HTC.dng on 32-bit Win CPU bots (patchset #1 id:1 of https://codereview.chromium.org/1995703002/ )
Reason for revert:
We think we have independently fixed this problem by using a smaller image for HTC.dng

Original issue's description:
> Blacklist HTC.dng on 32-bit Win CPU bots
>
> BUG=skia:5318
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995703002
>
> Committed: https://skia.googlesource.com/skia/+/62efdbde9987df3422f677a1a7c8f355791c1ae4

TBR=msarett@google.com,borenet@google.com,borenet@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:5318

Review-Url: https://codereview.chromium.org/2004203002
2016-05-23 14:35:52 -07:00
jvanverth
1d15596200 Add Xlib support to viewer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1999213002

Review-Url: https://codereview.chromium.org/1999213002
2016-05-23 13:13:36 -07:00
liyuqian
566c8e4a36 Move inval dedup to Window for wider usages.
It turns out that the inval dedup is not just useful for Android.  Hence
we move it up to the Window level so more OSes such as Linux, Windows
can also use it.

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

Review-Url: https://codereview.chromium.org/2001153002
2016-05-23 10:52:34 -07:00
brianosman
a56800a05d Add vksrgb config to dm (Vulkan sRGB). Fix help formatting of vk.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2005863002

Review-Url: https://codereview.chromium.org/2005863002
2016-05-23 10:11:07 -07:00
halcanary
f0270c32c1 fiddle: srand(0) before draw(canvas)
TBR=

Review-Url: https://codereview.chromium.org/2003043002
2016-05-23 09:02:38 -07:00
liyuqian
17b4a10921 Save comparisons for release.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1997003003

Review-Url: https://codereview.chromium.org/1997003003
2016-05-20 12:41:49 -07:00
liyuqian
beb1c67c9d Use SkASSERTResult to avoid unused local variables
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2003653002

Review-Url: https://codereview.chromium.org/2003653002
2016-05-20 11:41:01 -07:00
robertphillips
87f15c8ff1 Retract GrRenderTarget from GrTestTarget
Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

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

Review-Url: https://codereview.chromium.org/2004433002
2016-05-20 11:14:33 -07:00
liyuqian
e46e4f075b Correct gesture scale and translation
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1996613002

Review-Url: https://codereview.chromium.org/1996613002
2016-05-20 07:32:19 -07:00
jvanverth
af236b5aa9 Add OpenGL context to Viewer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003

Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f

Review-Url: https://codereview.chromium.org/1978573003
2016-05-20 06:01:06 -07:00
borenet
62efdbde99 Blacklist HTC.dng on 32-bit Win CPU bots
BUG=skia:5318
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995703002

Review-Url: https://codereview.chromium.org/1995703002
2016-05-18 12:23:58 -07:00
borenet
ac26aa630f Skip composeshader_bitmap GM on 64-bit Win CPU Test bots
Temporary measure to get the bots green while the real issue is sorted out.

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

Review-Url: https://codereview.chromium.org/1989323002
2016-05-18 08:12:51 -07:00
jvanverth
2884e9c0bd Revert of Add OpenGL context to Viewer. (patchset #7 id:120001 of https://codereview.chromium.org/1978573003/ )
Reason for revert:
sk_app/WindowContext.cpp is missing. Need to add file and resubmit.

Original issue's description:
> Add OpenGL context to Viewer.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003
>
> Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f

TBR=brianosman@google.com,bsalomon@google.com,djsollen@google.com
# 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/1990893002
2016-05-18 07:01:16 -07:00
kkinnunen
4803f9715f Remove NVPR related env var from command buffer GL context creation
NVPR is now enabled by default for Chromium command buffer.

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

Review-Url: https://codereview.chromium.org/1975753005
2016-05-17 22:15:39 -07:00
liyuqian
d3cdbcad65 Implement touch control
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1982643004

Review-Url: https://codereview.chromium.org/1982643004
2016-05-17 12:44:20 -07:00
jvanverth
56a11e4d6f Add OpenGL context to Viewer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003

Review-Url: https://codereview.chromium.org/1978573003
2016-05-17 12:15:48 -07:00
borenet
b55448b782 Make VisualBench bot build the visualbench target
Plus drive-by fixes for expectations/coverage.

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

Review-Url: https://codereview.chromium.org/1986273002
2016-05-17 10:26:15 -07:00
kkinnunen
aac0cb07ca Remove workarounds initializing command buffer EGL
The eglDisplay() of command buffer EGL implementation now does not
allocate a new EGL display per call, rather just returns the global.

The EGL implementation is fixed as part of bug 581634.

Removes eglTerminate call, as it's should not be used in Skia at the
moment. The call will terminate all of EGL, which is not intendend. The
previous usage was only due to incorrect implementation of the API.  Not
added back to anywhere else, leaking EGL globals is as
designed. Discussed in https://chromiumcodereview.appspot.com/1733323002.

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

Review-Url: https://codereview.chromium.org/1978733003
2016-05-17 06:01:40 -07:00
bsalomon
edea94c356 Implement vulkan fence syncs for nanobench
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1974913003

Review-Url: https://codereview.chromium.org/1974913003
2016-05-16 14:09:56 -07:00
robertphillips
7761d61876 Rename GrDrawingMgr::abandon to wasAbandoned & add a matching entry point to GrDrawingContext
Since GrDrawingContext is generally replacing GrRenderTarget, this is to provide functionality similar to GrRenderTarget::wasDestroyed.

This is split out of https://codereview.chromium.org/1930013002/ ((Mostly) Retract GrRenderTarget from SkGpuDevice)

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

Review-Url: https://codereview.chromium.org/1979913002
2016-05-16 09:14:53 -07:00
fmalita
796e365999 SkPictureGpuAnalyzer
Stateful helper for gathering multi-picture GPU stats.

Exposes the existing SkPicture GPU veto semantics, while preserving
the SKP impl (which has some nice properties: lazy, hierarchical,
cached per pic).

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

Review-Url: https://codereview.chromium.org/1974833003
2016-05-13 11:40:07 -07:00
egdaniel
b2df0c2702 Refactor Vulkan image, texture, RTs so that create and getter handles match.
This allows allows us to track and notify clients when either side changes
and image layout.

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

Review-Url: https://codereview.chromium.org/1974983002
2016-05-13 11:30:37 -07:00
cdalton
846c051a48 Convert GrClip to an abstract base class
Converts GrClip to an abstract base class and adds a "GrFixedClip"
implementation. GrFixedClip denotes a clip implemented with fixed-
function hardware. GrFixedClip allows us to remove the stateful
"fClipMode" member from GrClipMaskManager, and in the future will
be able to nicely encapsulate window rectangles.

After this change GrClipMaskManager is just a wrapper around
GrDrawTarget. We may want to consider removing it altogether.

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

Review-Url: https://codereview.chromium.org/1971343002
2016-05-13 10:25:00 -07:00