Commit Graph

83 Commits

Author SHA1 Message Date
mtklein
94c415170b Revert of Add a test that uses C++11 features as a compiler canary. (patchset #2 id:20001 of https://codereview.chromium.org/568913002/)
Reason for revert:
nope, nacl and ubuntu local bots (at least) broken

Original issue's description:
> Add a test that uses C++11 features as a compiler canary.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/86e01df8d1d8848044c3fcc31c1a2008b70fe08c

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/565213008
2014-09-12 17:07:34 -07:00
mtklein
86e01df8d1 Add a test that uses C++11 features as a compiler canary.
BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/568913002
2014-09-12 17:02:52 -07:00
mtklein
c54056c839 Back to hashing source content, not .png.
BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/560453002
2014-09-09 08:42:04 -07:00
mtklein
e2d4eb7072 Hash .pngs instead of SkBitmaps.
This has the nice property of being able to double-check hashes after the fact.

mtklein@mtklein ~/skia (hash-png)> md5sum bad/8888/3x3bitmaprect.png
deede70ab2f34067d461fb4a93332d4c  bad/8888/3x3bitmaprect.png

mtklein@mtklein ~/skia (hash-png)> grep 3x3bitmaprect_8888 bad/dm.json
   "3x3bitmaprect_8888" : "deede70ab2f34067d461fb4a93332d4c",

I have checked that no two premultiplied colors map to the same unpremultiplied
color (math nerds: unpremultiplication is injective), so a change in
premultiplied SkBitmap will always imply a change in the encoded
unpremultiplied .png.  This means, it's safe to hash .pngs; we won't miss
subtle changes.

BUG=skia:
R=jcgregorio@google.com, stephana@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/549203003
2014-09-08 12:42:23 -07:00
bsalomon
a1ae66d252 Add pop_back() to GrAllocator and add unit test.
BUG=skia:2889
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/538183002
2014-09-05 06:13:43 -07:00
robertphillips
d982eb22d7 Replace SkPictureReplacementPlayback with GrRecordReplaceDraw
I think this is sufficiently specialized to keep it in Ganesh for the time being.

R=bsalomon@google.com, mtklein@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/535953002
2014-09-03 11:04:31 -07:00
reed
2bdf1f56c3 Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/527073003/)
Reason for revert:
virtual gpu failures in layouttests

http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/23717

[6:6:0903/041147:1700960503:INFO:SkBitmap.cpp(1003)] ../../third_party/skia/src/core/SkBitmap.cpp:1003: failed assertion "fPixelRef->info() == pixelRef->info()"

[6:6:0903/041147:1700961002:FATAL:SkBitmap.cpp(1003)] SK_CRASH
#0 0x7f9867df2c1e base::debug::StackTrace::StackTrace()
#1 0x7f9867e89e05 logging::LogMessage::~LogMessage()
#2 0x7f98689c4970 SkDebugf_FileLine()
#3 0x7f986870ebc6 SkBitmap::deepCopyTo()
#4 0x7f98690a3b6d blink::deepSkBitmapCopy()
#5 0x7f98690a3abe blink::ImageBuffer::copyImage()
#6 0x7f985fd4479e blink::ImageBitmap::ImageBitmap()
#7 0x7f985fd45942 blink::ImageBitmap::create()
#8 0x7f985fd84fdc blink::ImageBitmapFactories::createImageBitmap()
#9 0x7f985fd84d11 blink::ImageBitmapFactories::createImageBitmap()
#10 0x7f985ec9a7f2 blink::LocalDOMWindowV8Internal::createImageBitmap13Method()
#11 0x7f985ec96b0c blink::LocalDOMWindowV8Internal::createImageBitmapMethod()
#12 0x7f985ec91954 blink::LocalDOMWindowV8Internal::createImageBitmapMethodCallback()
#13 0x7f9869955af0 v8::internal::FunctionCallbackArguments::Call()
#14 0x7f98699833bd v8::internal::Builtin_HandleApiCall()

Original issue's description:
> Add gamma/sRGB tag to SkImageInfo
>
> This reverts commit 1cbc68f965.
>
> requires this to land in blink https://codereview.chromium.org/531883002/
>
> Committed: https://skia.googlesource.com/skia/+/2f6abdecc5c2f21da13003c615903679abc73fc7

R=fmalita@google.com, reed@chromium.org
TBR=fmalita@google.com, reed@chromium.org
NOTREECHECKS=true
NOTRY=true

Author: reed@google.com

Review URL: https://codereview.chromium.org/535113002
2014-09-03 05:48:56 -07:00
reed
2f6abdecc5 Add gamma/sRGB tag to SkImageInfo
This reverts commit 1cbc68f965.

requires this to land in blink https://codereview.chromium.org/531883002/

R=fmalita@google.com, reed@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/527073003
2014-09-02 21:56:40 -07:00
piotaixr
aca21d6d2f Rename ScaledImageCache.cpp to SkResourceCacheTest.cpp
BUG=skia:
R=junov@chromium.org, reed@android.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/518213003
2014-09-02 11:51:00 -07:00
reed
1cbc68f965 Revert of Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/532583002/)
Reason for revert:
linux_blink_rel

[ RUN      ] DeferredImageDecoderTest.drawIntoSkPicture
../../third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp:172: Failure
Value of: canvasBitmap.getColor(0, 0)
Actual: 0
Expected: static_cast<SkColor>( (static_cast<U8CPU>(255) << 24) | (static_cast<U8CPU>(255) << 16) | (static_cast<U8CPU>(255) << 8) | (static_cast<U8CPU>(255) << 0))
Which is: 4294967295
[  FAILED  ] DeferredImageDecoderTest.drawIntoSkPicture (0 ms)
[1457/1458] DeferredImageDecoderTest.drawIntoSkPicture (0 ms)
[ RUN      ] DeferredImageDecoderTest.decodeOnOtherThread
../../third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp:233: Failure
Value of: canvasBitmap.getColor(0, 0)
Actual: 0
Expected: static_cast<SkColor>( (static_cast<U8CPU>(255) << 24) | (static_cast<U8CPU>(255) << 16) | (static_cast<U8CPU>(255) << 8) | (static_cast<U8CPU>(255) << 0))
Which is: 4294967295
[  FAILED  ] DeferredImageDecoderTest.decodeOnOtherThread (1 ms)
[1458/1458] DeferredImageDecoderTest.decodeOnOtherThread (1 ms)
Retrying 2 tests (retry #2)

Original issue's description:
> Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/525113005/)
>
> Reason for revert:
> Experiment to see resulting failures
>
> Original issue's description:
> > Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/)
> >
> > Reason for revert:
> > seems to be breaking layout tests in roll
> >
> > Original issue's description:
> > > Add gamma/sRGB tag to SkImageInfo
> > >
> > > This reverts commit 64ba5fa1ff.
> > >
> > > BUG=skia:
> > >
> > > Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb
> >
> > TBR=reed@google.com
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/b44c1895afae516cb851cd1a0cea83343c354ee4
>
> TBR=reed@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4581828014eb3d015e6ed55c9a5b6932b8751818

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

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/524593005
2014-09-02 04:14:37 -07:00
reed
4581828014 Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/525113005/)
Reason for revert:
Experiment to see resulting failures

Original issue's description:
> Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/)
>
> Reason for revert:
> seems to be breaking layout tests in roll
>
> Original issue's description:
> > Add gamma/sRGB tag to SkImageInfo
> >
> > This reverts commit 64ba5fa1ff.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb
>
> TBR=reed@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b44c1895afae516cb851cd1a0cea83343c354ee4

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

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/532583002
2014-09-01 18:36:24 -07:00
reed
b44c1895af Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/)
Reason for revert:
seems to be breaking layout tests in roll

Original issue's description:
> Add gamma/sRGB tag to SkImageInfo
>
> This reverts commit 64ba5fa1ff.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb

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

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/525113005
2014-09-01 14:28:32 -07:00
reed
c89aa509d6 Add gamma/sRGB tag to SkImageInfo
This reverts commit 64ba5fa1ff.

BUG=skia:
R=reed@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/522813002
2014-09-01 12:14:29 -07:00
reed
64ba5fa1ff Revert of Add gamma/sRGB tags to SkImageInfo (patchset #1 of https://codereview.chromium.org/517123002/)
Reason for revert:
Seems to be triggering assert in blink

SSLUITest.TestRedirectHTTPToBadHTTPS (run #1):
[ RUN      ] SSLUITest.TestRedirectHTTPToBadHTTPS
HTTP server started on http://127.0.0.1:58000...
sending server_data: {"host": "127.0.0.1", "port": 58000} (36 bytes)
HTTPS server started on https://127.0.0.1:58009...
sending server_data: {"host": "127.0.0.1", "port": 58009} (36 bytes)
ASSERTION FAILED: info.fAlphaType == m_imageInfo.fAlphaType
../../third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp(78) : virtual bool blink::DecodingImageGenerator::onGetPixels(const SkImageInfo &, void *, size_t, SkPMColor *, int *)
1   0x77eb0d3 blink::DecodingImageGenerator::onGetPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*)
2   0x92edddc SkImageGenerator::getPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*)
3   0x92adf78 SkDiscardablePixelRef::onNewLockPixels(SkPixelRef::LockRec*)
4   0x9369283 SkPixelRef::lockPixels(SkPixelRef::LockRec*)
5   0x9369433 SkPixelRef::lockPixels()
6   0x9213344 SkBitmap::lockPixels() const
7   0x921ca57 SkAutoLockPixels::SkAutoLockPixels(SkBitmap const&, bool)
8   0x921ad80 SkAutoLockPixels::SkAutoLockPixels(SkBitmap const&, bool)
9   0x92b7125 SkDraw::drawBitmap(SkBitmap const&, SkMatrix const&, SkPaint const&) const
10  0x921f4fb SkBitmapDevice::drawBitmap(SkDraw const&, SkBitmap const&, SkMatrix const&, SkPaint const&)
11  0x921f8c7 SkBitmapDevice::drawBitmapRect(SkDraw const&, SkBitmap const&, SkRect const*, SkRect const&, SkPaint const&, SkCanvas::DrawBitmapRectFlags)
12  0x9288e12 SkCanvas::internalDrawBitmapRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags)
13  0x9288ee9 SkCanvas::drawBitmapRectToRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags)

Original issue's description:
> Add gamma/sRGB tags to SkImageInfo
>
> requires this CL to land in chrome
> https://codereview.chromium.org/517803002/
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/228b285ba14a6e9b6d1cc95ea1583caab30168a1

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

Author: reed@google.com

Review URL: https://codereview.chromium.org/519583004
2014-08-29 07:50:28 -07:00
reed
228b285ba1 Add gamma/sRGB tags to SkImageInfo
requires this CL to land in chrome
https://codereview.chromium.org/517803002/

BUG=skia:
R=fmalita@google.com, fmalita@chromium.org, reed@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/517123002
2014-08-29 04:08:43 -07:00
reed
088f4b8eb3 Revert of Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of https://codereview.chromium.org/511363002/)
Reason for revert:
android builder in chrome reveals the caller using { } initialization for SkImageInfo, which this CL now makes illegal. Will have to fix the call site before I can re-land this

Original issue's description:
> Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of https://codereview.chromium.org/512243002/)
>
> Reason for revert:
> this revert was premature -- the chrome canary I looked at is old, and newer ones were green. So trying again...
>
> Original issue's description:
> > Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/)
> >
> > Reason for revert:
> > breaks linker on chrome -- may need SK_API, but not sure.
> >
> > Original issue's description:
> > > add gamma/sRGB to SkImageInfo
> > >
> > > BUG=skia:
> > >
> > > Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485
> >
> > TBR=bungeman@google.com,bsalomon@google.com
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/dc53701216c0e9f98eacf6c0cda769ebbd200b59
>
> TBR=bungeman@google.com,bsalomon@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e759a2662273fdf52ebbb3822229945eda317e46

R=bungeman@google.com, bsalomon@google.com
TBR=bsalomon@google.com, bungeman@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

Review URL: https://codereview.chromium.org/517113002
2014-08-28 14:46:19 -07:00
reed
e759a26622 Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of https://codereview.chromium.org/512243002/)
Reason for revert:
this revert was premature -- the chrome canary I looked at is old, and newer ones were green. So trying again...

Original issue's description:
> Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/)
>
> Reason for revert:
> breaks linker on chrome -- may need SK_API, but not sure.
>
> Original issue's description:
> > add gamma/sRGB to SkImageInfo
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485
>
> TBR=bungeman@google.com,bsalomon@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/dc53701216c0e9f98eacf6c0cda769ebbd200b59

R=bungeman@google.com, bsalomon@google.com
TBR=bsalomon@google.com, bungeman@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

Review URL: https://codereview.chromium.org/511363002
2014-08-28 11:57:34 -07:00
reed
dc53701216 Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/)
Reason for revert:
breaks linker on chrome -- may need SK_API, but not sure.

Original issue's description:
> add gamma/sRGB to SkImageInfo
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485

R=bungeman@google.com, bsalomon@google.com
TBR=bsalomon@google.com, bungeman@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

Review URL: https://codereview.chromium.org/512243002
2014-08-28 06:53:19 -07:00
reed
615c369777 add gamma/sRGB to SkImageInfo
BUG=skia:
R=bungeman@google.com, bsalomon@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/514753002
2014-08-28 05:56:37 -07:00
halcanary
daefa5b340 JPEG(JFIF only) directly embedded into PDF
R=reed@google.com, djsollen@google.com, mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/515493003
2014-08-27 13:00:54 -07:00
fmalita
c6765d69e3 Add some SkTextBlob builder tests.
R=reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/493443004
2014-08-21 15:03:04 -07:00
piotaixr
d2a3522503 Add the method isOpaque() to SkImage
BUG=skia:2766
R=junov@chromium.org, halcanary@google.com, scroggo@google.com, reed@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/406673003
2014-08-19 14:29:02 -07:00
djsollen
3b6255493e Remove SkPaintOptionsAndroid
Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b

R=reed@google.com, mtklein@google.com, tomhudson@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/447873003
2014-08-14 06:29:03 -07:00
bsalomon
c15e28a522 Revert of Remove SkPaintOptionsAndroid (patchset #5 of https://codereview.chromium.org/447873003/)
Reason for revert:
Breaks the Chromium build: http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2469/steps/BuildContentShell_1/logs/stdio

Original issue's description:
> Remove SkPaintOptionsAndroid
>
> Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b

R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com
TBR=djsollen@google.com, mtklein@google.com, reed@google.com, tomhudson@google.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/473543004
2014-08-13 15:18:46 -07:00
djsollen
f32331ffdb Remove SkPaintOptionsAndroid
R=reed@google.com, mtklein@google.com, tomhudson@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/447873003
2014-08-13 13:09:49 -07:00
joshualitt
bab82ed05b Pretty print of shaders
BUG=skia:
R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/437593004
2014-08-08 09:41:42 -07:00
Derek Sollenberger
da7a944e29 Revert "Remove SkPaintOptionsAndroid"
This reverts commit 27fb94999b.

Review URL: https://codereview.chromium.org/450513002
2014-08-06 16:34:40 -04:00
Derek Sollenberger
27fb94999b Remove SkPaintOptionsAndroid
Review URL: https://codereview.chromium.org/447873003
2014-08-06 16:30:51 -04:00
tomhudson
816b4fb97c Fix bad gypi
Must not depend directly on ports; depend on skialib!

R=bungeman@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/442883002
2014-08-05 12:01:09 -07:00
tomhudson
f79673bbae Test and generalize font configuration parser
Add a basic unit test for the Android font configuration parser.
Add a check for the new LMP file format; on detection, switch to a new
(as-yet unwritten) parser.

R=bungeman@google.com, djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/439813002
2014-08-05 06:36:14 -07:00
robertphillips
8ab8cc07cf Finish removing GrTHashTable
This class is no longer used in Ganesh (in favor of SkTDynamicHash)

R=jvanverth@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/421253003
2014-07-29 06:17:49 -07:00
djsollen
85d36525c6 fix android_framework build do to missing library at link time
R=scroggo@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/407073006
2014-07-22 13:56:34 -07:00
scroggo
24519371cb Run CanvasState test across a library boundary.
Refactor CanvasStateTest to pull out functions which can
either be called directly or from a shared library. Add a
command line flag to pass in the path to a library to open
to call those functions from.

Separate different CanvasTest tests into separate DEF_TEST
tests. This allows them to be run in parallel.

Move the ifdefs outside of function declarations to skip
running CanvasTest tests which do nothing.

Add the canvas_state_lib target. It is a shared library that
exports some functions to be called by another version of
Skia.

BUG=b/15693384
R=djsollen@google.com, reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/400043003
2014-07-22 12:38:55 -07:00
caryclark
17f0b6df72 share dm and command flags
Share command flags between dm and unit tests.
Also, allow dm's core to be included by itself and iOSShell.

Command line flags that are the same (or nearly the same) in DM
and in skia_tests have been moved to common_flags. Authors,
please check to see that the shared common flag is correct for
the tool.

For iOS, the 'tool_main' entry point has a wrapper to allow multiple
tools to be statically linked in the iOSShell.
Since SkCommandLineFlags::Parse can only be called once, these calls
are disabled in the IOS build.

Since the iOS app directory is dynamically assigned a name, use '@' to
select it. (This is the same convention chosen by the Mobile Harness
iOS file system utilities.)

Move the heart of dm.gyp into dm.gypi so that it can be included by
itself and iOSShell.gyp.

Add tools/flags/SkCommonFlags.* to define and declare common
command line flags.

Add support for dm to iOSShell.

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

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/389653004
2014-07-22 10:15:35 -07:00
sugoi
518d83dbc1 Skia side RGB to YUV gpu conversion
This code is the one that's currently working in my local chromium build. A few things still need to be addressed and I'll highlight these directly in the code.

BUG=skia:
R=reed@google.com, bsalomon@google.com, senorblanco@google.com, senorblanco@chromium.org, robertphillips@google.com, scroggo@google.com, halcanary@google.com

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/374743003
2014-07-21 11:37:39 -07:00
halcanary
805ef159d1 Set maximum output size for scaled-image-cache images
Accessable via:
  SkScaledImageCache::{G,S}etMaximumOutputSizeForHighQualityFilter

Also, a unit test.

BUG=389439
R=humper@google.com, tomhudson@google.com, reveman@chromium.org, vangelis@chromium.org, reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/394003003
2014-07-17 06:58:01 -07:00
joshualitt
ee5da55477 32 bpp floating point textures
This is VERY preliminary, but it was sufficient for me to get 32 bit floating point textures in a sample app

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

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/359803003
2014-07-16 13:32:56 -07:00
bungeman
c7af812b42 Revert of Reopened: Caching the result of readPixelsSupported (https://codereview.chromium.org/364193004/)
Reason for revert:
This appears to be causing failures on Android when running tests.

Original issue's description:
> Caching the result of readPixelsSupported
>
> The call was calling GR_GL_GetIntegerv 2 times for each readPixels
> and thus was causing a loss of performance
>
> (resubmit of issue 344793008)
>
> Benchmark url: http://packages.gkny.fr/tst/index.html
>
> BUG=skia:2681
>
> Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c
>
> Committed: https://skia.googlesource.com/skia/+/8339371f1ec3c57a0741932fd96bff32c53d4e54

R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, mtklein@google.com, bsalomon@google.com, piotaixr@chromium.org
TBR=bsalomon@chromium.org, bsalomon@google.com, junov@chromium.org, mtklein@google.com, piotaixr@chromium.org, reed@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:2681

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/395203002
2014-07-16 09:10:41 -07:00
piotaixr
8339371f1e Caching the result of readPixelsSupported
The call was calling GR_GL_GetIntegerv 2 times for each readPixels
and thus was causing a loss of performance

(resubmit of issue 344793008)

Benchmark url: http://packages.gkny.fr/tst/index.html

BUG=skia:2681

Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c

R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, mtklein@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/364193004
2014-07-15 19:41:08 -07:00
piotaixr
cef04f8188 Deleted SkImage::newShaderClamp: not used, not implemented.
Implemented SkImage::newShader.

BUG=skia:2701, 344804
R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/345463009
2014-07-14 07:48:04 -07:00
Mike Klein
874a62acef Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."
This reverts commit 4ae94ffce5.

BUG=skia:

Review URL: https://codereview.chromium.org/382523002
2014-07-09 09:04:07 -04:00
tfarina
0a65e38560 Cleanup: Rename UnitTestTest.cpp to RTConfRegistryTest.cpp
BUG=None
TEST=make tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/374443002
2014-07-08 10:33:28 -07:00
mtklein
4ae94ffce5 Remove ability for Release code to call getRefCnt() or getWeakRefCnt().
These getRefCnt() methods are not thread safe, so Skia code should not
be calling them.  unique() is fine.

SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt().

This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in
both debug and release modes.

BUG=skia:2726
R=senorblanco@chromium.org, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/378643003
2014-07-08 06:48:17 -07:00
robertphillips
952841bf41 Begin atlasing
This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled):

1) the atlased layers cannot be purged nor aged out
2) the texture backing the atlas is not pulled from (or returned to) the resource cache

#1 is on hold until we have a recycling rectanizer

A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents.

Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/354533004
2014-06-30 08:26:50 -07:00
robertphillips
e462f2bed3 Revert of Begin atlasing (https://codereview.chromium.org/354533004/)
Reason for revert:
Sigh

Original issue's description:
> Begin atlasing
>
> This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled):
>
> 1) the atlased layers cannot be purged nor aged out
> 2) the texture backing the atlas is not pulled from (or returned to) the resource cache
>
> #1 is on hold until we have a recycling rectanizer
>
> A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents.
>
> Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/359953002
2014-06-29 17:16:27 -07:00
robertphillips
55e61f0ef4 Begin atlasing
This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled):

1) the atlased layers cannot be purged nor aged out
2) the texture backing the atlas is not pulled from (or returned to) the resource cache

#1 is on hold until we have a recycling rectanizer

A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/354533004
2014-06-29 15:08:31 -07:00
tfarina
11a005ee01 Promote SkInterpolator unit test to our tests driver.
BUG=None
TEST=make tests && out/Debug/tests -m Interpolator
R=mtklein@google.com, bsalomon@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/351713005
2014-06-26 13:07:05 -07:00
tfarina
12345aee12 Rename TestSize.cpp to SizeTest.cpp
It is the only file where Test is the prefix rather than the sufix.
 This patch fixes that so it matches with the rest of the files
 under tests/ directory.

And separate SkISize test into its own DEF_TEST().

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

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/337783007
2014-06-25 10:39:02 -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