Commit Graph

159 Commits

Author SHA1 Message Date
jvanverth
d17a32966a Add normal map sample
This adds an example of an SkShader that does normal
mapping. It has a single directional light and an
ambient light.

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

Review URL: https://codereview.chromium.org/1212813009
2015-07-09 09:04:16 -07:00
robertphillips
426388eeb7 Revert of Add normal map sample (patchset #6 id:100001 of https://codereview.chromium.org/1212813009/)
Reason for revert:
Compilation failures:

../../../../../samplecode/SampleLighting.cpp:13:18: fatal error: SkGr.h: No such file or directory

Original issue's description:
> Add normal map sample
>
> This adds an example of an SkShader that does normal
> mapping. It has a single directional light and an
> ambient light.
>
> Committed: https://skia.googlesource.com/skia/+/8e0da72ba890de395c9946ec6639c9e1e7b16027

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

Review URL: https://codereview.chromium.org/1230603002
2015-07-08 14:46:12 -07:00
jvanverth
8e0da72ba8 Add normal map sample
This adds an example of an SkShader that does normal
mapping. It has a single directional light and an
ambient light.

Review URL: https://codereview.chromium.org/1212813009
2015-07-08 14:21:47 -07:00
Mike Klein
478c9e4851 Revert "Move headers used by headers in include/ to include/private."
This reverts commit 928e16565f.

BUG=skia:

Review URL: https://codereview.chromium.org/1213093004.
2015-07-01 16:35:59 -04:00
mtklein
928e16565f Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

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

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 11:55:42 -07:00
jvanverth
4417c7f8bb Revert "Move headers used by headers in include/ to include/private."
This reverts commit a89f55198b.

Reason: breaking the roll.

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1216033008
2015-07-01 09:45:46 -07:00
mtklein
a89f55198b Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 08:41:15 -07:00
bungeman
3fdde4e129 Remove old iOS porting files.
These files do not appear to be used, are unfinished, and should be
redundant with the mac porting files.

Review URL: https://codereview.chromium.org/1197963003
2015-06-29 14:12:41 -07:00
reed
71c3c760a8 add SkCanvas::drawAtlas
BUG=skia:

Review URL: https://codereview.chromium.org/1181913003
2015-06-24 10:29:18 -07:00
bsalomon
241b56db1d Allows windowed apps to be built on the Mac just by writing a SkOSWindow subclass without needing nib/plist files.
Makes visualbench work on the Mac.

Review URL: https://codereview.chromium.org/1184143011
2015-06-18 11:49:42 -07:00
bsalomon
48297f72fb Allow skia_win.cpp to be compiled in CONSOLE or GUI mode.
Make visualbench and SampleApp build in CONSOLE mode so that we can see stdout.

I verified that by undoing the gyp modifications both tools will build as GUI.

Review URL: https://codereview.chromium.org/1185303004
2015-06-16 12:21:00 -07:00
reed
ca1a22ee53 Revert of Revert of remove unused (by clients) SkPathUtils (patchset #1 id:1 of https://codereview.chromium.org/1060703003/)
Reason for revert:
fix (removal from gypi/gn files) has landed in chrome.

Original issue's description:
> Revert of remove unused (by clients) SkPathUtils (patchset #1 id:1 of https://codereview.chromium.org/1088383003/)
>
> Reason for revert:
> This change is causing the DEPS roll to fail:
>
>
> http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/78771/steps/gn/logs/stdio
>
> Original issue's description:
> > remove unused (by clients) SkPathUtils
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/aab35d91b8b80acd1902594bbf542083fdfa4bb7
>
> TBR=scroggo@google.com,reed@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/bdb0bf5f8858043878d8a4fa8130c6c87bef3fd4

TBR=scroggo@google.com,jcgregorio@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1091963002
2015-04-16 20:10:55 -07:00
jcgregorio
bdb0bf5f88 Revert of remove unused (by clients) SkPathUtils (patchset #1 id:1 of https://codereview.chromium.org/1088383003/)
Reason for revert:
This change is causing the DEPS roll to fail:

http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/78771/steps/gn/logs/stdio

Original issue's description:
> remove unused (by clients) SkPathUtils
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/aab35d91b8b80acd1902594bbf542083fdfa4bb7

TBR=scroggo@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1060703003
2015-04-16 09:47:36 -07:00
reed
aab35d91b8 remove unused (by clients) SkPathUtils
BUG=skia:

Review URL: https://codereview.chromium.org/1088383003
2015-04-16 06:16:38 -07:00
borenet
4808757d7a Remove all code related to NaCl
BUG=skia:3600
DOCS_PREVIEW= https://skia.org/?cl=1036283002

Review URL: https://codereview.chromium.org/1036283002
2015-04-02 12:16:36 -07:00
scroggo
3e5622764a Add copyright headers to remaining gyp files.
Prevents some PRESUBMIT errors.

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/1035523003
2015-03-25 10:22:41 -07:00
caryclark
63c684a8a6 fuzzer fixes
Fix path bugs exposed by the path fuzzer.

Changes to existing gm and samplecode files defer their calls to construct
SkPath objects until the first draw instead of at test initialization.

Add an experimental call to SkPath to validate the internal SkPathRef.

Fix SkPath::addPoly to set the last moveto after adding a close verb.

Fix stroke to handle failures when computing the unit normal.

Add a unit test for the unit normal failure.

R=reed@google.com

Review URL: https://codereview.chromium.org/953383002
2015-02-25 09:04:04 -08:00
reed
0ab326f530 move GMSampleView into its own cpp
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/947733002
2015-02-21 09:36:50 -08:00
caryclark
88c748aeea update sampleapp for stroking experiment
Add RotateCircles3 back as better-named QuadStroker.

Switch pathfill test to call skia before draw instead of in
initializer to avoid triggering debugging breakpoints.

Review URL: https://codereview.chromium.org/912273003
2015-02-18 10:56:00 -08:00
reed
339cdbfb75 migrate more samples over to SkAnimTImer
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/901933004
2015-02-05 22:02:37 -08:00
scroggo
e7ea40f4e0 Reland "remove unused SkAvoidXfermode"
(patchset #2 id:20001 of https://codereview.chromium.org/860583002/)

SkAvoidXfermode has been moved into Android, so it is safe to remove.

Review URL: https://codereview.chromium.org/890893003
2015-01-30 13:16:02 -08:00
robertphillips
7defaa6c4a Add ClipDrawMatch SampleApp slide
This slide can be used to find and diagnose discrepancies between BW clipping and drawing.

BUG=skia:423834

Review URL: https://codereview.chromium.org/872363003
2015-01-27 06:17:22 -08:00
halcanary
b0cce2c1d3 s/sk_tools::DrawCheckerboard/sk_tool_utils::draw_checkerboard/
BUG=skia:

Review URL: https://codereview.chromium.org/873333004
2015-01-26 12:49:00 -08:00
halcanary
878fa0204b Factor out checkerboard function in gm and sampleapp into tools.
Review URL: https://codereview.chromium.org/834303005
2015-01-26 11:24:32 -08:00
scroggo
b2b416d384 Revert of remove unused SkAvoidXfermode (patchset #2 id:20001 of https://codereview.chromium.org/860583002/)
Reason for revert:
Breaking Android framework build, which still uses AvoidXfermode. (failure shown here: 565b76b4bd/logs/build_error.log)

Here is the Java class that uses it: https://cs.corp.google.com/#android/frameworks/base/graphics/java/android/graphics/AvoidXfermode.java&sq=package:android

It has been deprecated. The glue code (which actually references the Skia file) is here: https://cs.corp.google.com/#android/frameworks/base/core/jni/android/graphics/Xfermode.cpp&q=Xfermode.cpp&sq=package:android

Mike suggested we move the implementation into Android, which is fine with me.

Original issue's description:
> remove unused SkAvoidXfermode
>
> BUG=skia:
> TBR=
> NOTRY=True
>
> Committed: https://skia.googlesource.com/skia/+/2d02df7a9a50217dac8c1d11681832a927ed79ce

TBR=bsalomon@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/822953003
2015-01-20 06:33:14 -08:00
reed
2d02df7a9a remove unused SkAvoidXfermode
BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/860583002
2015-01-18 20:01:30 -08:00
reed
afdbedb73c add sample for filter quality
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/788163007
2015-01-14 13:16:26 -08:00
reed
63121f0db6 delete the dreaded TransitionView
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/850843002
2015-01-13 19:43:04 -08:00
reed
adc8d98467 add sample to exercising hittesting
patch from issue 752403002 at patchset 1 (http://crrev.com/752403002#ps1)

BUG=skia:

Review URL: https://codereview.chromium.org/760023002
2014-11-26 08:45:36 -08:00
mtklein
ecf987559b Turn SkTaskGroups back on.
Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

Review URL: https://codereview.chromium.org/687263007
2014-11-03 17:41:08 -08:00
mtklein
e9f7fbfaee Revert of Turn SkTaskGroups back on. (patchset #1 id:1 of https://codereview.chromium.org/687263007/)
Reason for revert:
precautionary revert.  may have caused WinXP crashes on Chrome tree: https://code.google.com/p/chromium/issues/detail?id=429207

Original issue's description:
> Turn SkTaskGroups back on.
>
> Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
> Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."
>
> NOTREECHECKS=true
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/693993002
2014-10-31 11:30:22 -07:00
mtklein
2100c5ed7a Turn SkTaskGroups back on.
Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/687263007
2014-10-31 06:38:25 -07:00
mtklein
13a8de0b51 Revert harder, removing SkTaskGroup.cpp from core temporarily.
Not all linkers are seeing the SkThread code is not needed.

BUG=skia:
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/673903007
2014-10-30 08:19:19 -07:00
humper
d1d3baeb98 add an animated test to verify that high-quality identity scaling doesn't change the image
BUG=skia:
R=reed@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/454913002
2014-08-08 12:11:33 -07:00
mtklein
a7e930f640 On the bots, there's no need to link GMs into SampleApp.
We build SampleApp on the bots to make sure it's not broken, but we don't run it.  So, there's no need to link in all the GMs as samples.

This reduces the number of copies of our GMs from 4 to 3 (gm, dm, and nanobench remain).

NOTREECHECKS=true

BUG=skia:2142
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/447803002
2014-08-06 10:08:42 -07:00
caryclark
f568f6a557 git sample app working on iOS
R=jvanverth@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/405653002
2014-07-18 10:58:56 -07:00
tfarina
2010891425 Add GYP target for sk_tool_utils.* component.
This declares a static library target in gyp/sk_tool_utils.gyp, so other
targets can depend directly on it instead of including the source file
in their source lists.

BUG=None
TEST=make all
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/348623006
2014-06-21 10:54:17 -07:00
mtklein
9ac68ee259 Move BenchTimer to tools as Timer
This breaks a bunch of circular dependencies between tools and gm and bench.

BUG=skia:

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

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
R=tfarina@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/344213003
2014-06-20 11:29:21 -07:00
mtklein
9e64b78ff6 Revert of Move BenchTimer to tools as Timer (https://codereview.chromium.org/344213003/)
Reason for revert:
GpuTimer broken

Original issue's description:
> Move BenchTimer to tools as Timer
>
> This breaks a bunch of circular dependencies between tools and gm and bench.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4ed75287aed6371c6e4a41ffcc78c8a49c9810ed

R=tfarina@chromium.org, mtklein@chromium.org
TBR=mtklein@chromium.org, tfarina@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/346753003
2014-06-20 10:43:07 -07:00
mtklein
4ed75287ae Move BenchTimer to tools as Timer
This breaks a bunch of circular dependencies between tools and gm and bench.

BUG=skia:
R=tfarina@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/344213003
2014-06-20 10:31:49 -07:00
tfarina
bcbc1788b4 Refactor how we handle resources path in Tests.
This idea emerged while doing https://codereview.chromium.org/321723002/
(commit 880914c35c).

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/346453002
2014-06-18 14:32:49 -07:00
reed
c3b3266b7d hide SkBitmap::Config entirely (behind a flag)
patch from issue 339463002

TBR=

I think the NoGPU failure is unrelated, so ignoring
NOTRY=True

Author: reed@google.com

Review URL: https://codereview.chromium.org/340533002
2014-06-17 08:38:31 -07:00
jvanverth
66c9582d1b Fix a number of issues with iOS build.
Set pointer to root view in window (for SampleApp)
Set up the correct function pointer for GL multisampling
Remove use of SkBitmap::setConfig()
Remove incomplete iOS implementation of SkFILE (use SkOSFile for now)

R=caryclark@google.com, reed@google.com, bsalomon@google.com, tfarina@chromium.org

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/322403007
2014-06-11 13:59:22 -07:00
krajcevski
2dc337c3ae Add non power of two gm for ETC1 bitmap
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/316813005
2014-06-04 09:57:48 -07:00
robertphillips
901e96df69 Add Sample slide for Rectanizers
R=jvanverth@google.com, bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/303263005
2014-06-02 07:15:18 -07:00
commit-bot@chromium.org
1803f4eb34 new animated sample to show subpixel translate bug with high quality scaling
BUG=1445
R=reed@google.com, robertphillips@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/303123003

git-svn-id: http://skia.googlecode.com/svn/trunk@14981 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-29 22:01:08 +00:00
commit-bot@chromium.org
83f23d87f1 Remove unused (by clients) SkUnitMapper
This reverts commit 874423a81b5bc2541c7397e6ab00d5e7c9fdaf98.

TBR=scroggo

Author: reed@google.com

Review URL: https://codereview.chromium.org/288313009

git-svn-id: http://skia.googlecode.com/svn/trunk@14842 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-22 12:27:41 +00:00
commit-bot@chromium.org
3339ac54a5 Revert of Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/) (https://codereview.chromium.org/288343009/)
Reason for revert:
required blink change failed to land

Original issue's description:
> Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)
>
> This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14830

R=scroggo@google.com, reed@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/296823008

git-svn-id: http://skia.googlecode.com/svn/trunk@14838 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-22 02:55:59 +00:00
commit-bot@chromium.org
4b8f802255 Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)
This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f.

BUG=skia:
R=scroggo@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/288343009

git-svn-id: http://skia.googlecode.com/svn/trunk@14830 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-21 19:56:46 +00:00
commit-bot@chromium.org
e2b193ca5c Revert of remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)
Reason for revert:
does not address all legacy callsites in chrome.

e.g.

[13:45:32.091872] ../../ui/native_theme/native_theme_base.cc:608:76: error: no matching function for call to ‘SkGradientShader::CreateLinear(SkPoint [3], SkColor [3], NULL, int, SkShader::TileMode, NULL)’
[13:45:32.091919]            gradient_bounds, colors, NULL, 3, SkShader::kClamp_TileMode, NULL));


Original issue's description:
> remove unused (by clients) SkUnitMapper
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14761

R=robertphillips@google.com, scroggo@google.com, george@mozilla.com
TBR=george@mozilla.com, robertphillips@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

Review URL: https://codereview.chromium.org/287063009

git-svn-id: http://skia.googlecode.com/svn/trunk@14763 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-16 13:49:08 +00:00