History log of /external/skia/tests/Writer32Test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
affa77db64b75b9d32c7e42282bcc2e4eb2a94c3 13-Mar-2014 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13782 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
c30dcb9b128887c7e16afe32fdf35105cc42380b 12-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add capture snapshot as data to SkWriter32, use it to optimise record->playback.
This is a new way of implementing https://codereview.chromium.org/155863005/
It uses copy on write semantics to return a buffer without copying it, so that record -> playback does not need to copy the buffer.

BUG=skia:2125
R=tomhudson@google.com, mtklein@google.com, reed@google.com, iancottrell@chromium.org

Author: iancottrell@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13769 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
536ac5e20c2ec2008993c0677ba8cbc5ae0f34cf 11-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Templetized SkWriter32 readTAt() & overwriteTAt()

Convert SkWriter32::{read,write}32At() to ::{read,overwrite}TAt<>() to allow
peeking/updating arbitrary records.


BUG=skia:
R=mtklein@google.com, reed@google.com, robertphillips@google.com, iancottrell@chromium.org

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13416 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
afe38b16f082c8d88039339591376be54c7e801b 11-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix broken debug build

BUG=skia:
R=tomhudson@google.com

Author: iancottrell@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13397 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
c6d3c444ca76feba5a8937dbc80626ade5347275 31-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Have peek32 return uint32_t& to make it harder to look at more than 4 bytes.

BUG=skia:
R=reed@google.com, robertphillips@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13265 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
8f6884aab8aecd7657cf3f9cdbc682f0deca29c5 24-Jan-2014 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Cleanup: Sanitize the order of includes under tests/

Initially this was to make sure Test.h appeared after the Sk*.h includes.

Patch generated by the following command line:

$ ~/chromium/src/tools/sort-headers.py tests/*.cpp

BUG=None
TEST=tests
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
e2eac8b2fd8966cc9af51f8d40151dad6c591d2e 14-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Move macros from TestClassDef.h to Test.h

Motivation: those macros don't make any sense without the definitions
in Test.h.

BUG=
R=mtklein@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
19382421b916aab00be7265815ba4e2690adf2c9 14-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Convert SkWriter32 to use an SkTDArray for its internal storage.

This reduces the allocation overhead of a null picture (create, beginRecording(), endRecording) from about 18K to about 1.9K. (There's still lots more to prune.)

SkPictureFlat can exploit the fact that Writer32 is contiguous simplify its memory management. The Writer32 itself becomes the scratch buffer.

Remove lots and lots of arbitrary magic numbers that were size guesses and minimum allocation sizes. Keep your eyes open for the big obvious DUH why we save 16K per picture! (Spoiler alert. It's because that first save we issue in beginRecording() forces the old SkWriter32 to allocate 16K.)

Tests passing, DM passing.

bench --match writer: ~20% faster
null bench_record: ~30% faster
bench_record on buildbot .skps: ~3-6% slower, ranging 25% faster to 20% slower
bench_pictures on buildbot .skps: ~1-2% faster, ranging 13% faster to 28% slower

BUG=skia:1850
R=reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13073 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
e4fafb146e85cdfcf9d5418597b6818aa0754ada 12-Dec-2013 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Use DEFINE_TESTCLASS_SHORT macro in tests.

The three version of DEFINE_TESTCLASS macro is deprecated and thus just
use the simple, short one.

BUG=None
TEST=out/Debug/tests
R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12653 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
4469938e92d779dff05e745559e67907bbf21e78 31-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning""

This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
6fcbfcead5dc1b61fa5b4c139a1a3714e8c58091 31-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"

This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497.

git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
081560e3abe25c4821b79ca1465f4dbd371c4b5c 31-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning

BUG=
R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
e0e7cfe44bb9d66d76120a79e5275c294bacaa22 09-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Change old PRG to be SkLCGRandom; change new one to SkRandom

The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to
rebaseline GMs.

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

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/23576015

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
8b4ba6373559026f7e24de1b8b487d8b72256dc1 03-Sep-2013 mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix bug in SkWriter32.

If you give SkWriter32 external storage but that external storage is too small
for the first reservation you make, you'll hit an assert in debug mode.

I think the answer is to simply remove the SkASSERT. Added a test.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11062 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
0038c12f337b7037ef698e2723099c7e3b19c4ca 15-Aug-2013 mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Write NULL as "" so readString() always returns a non-NULL string.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10754 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
47fa13640b7c8615aa7aee0d5b1d63a7bd6ed44e 09-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> allow NULL in writeString/readString

BUG=skia:1469, code.google.com/p/android/issues/detail?id=58257
R=scroggo@google.com

Author: mtklein@google.com

Review URL: https://chromiumcodereview.appspot.com/22359003

git-svn-id: http://skia.googlecode.com/svn/trunk@10662 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
ff36a1d07f23f2b7feddaba110d448073a96f83c 24-Jul-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Start from scratch on a faster SkFlatDictionary.

This is like codereview.chromium.org/19276003, except it fits in better with the existing code, doesn't leak memory, and because it's back using SkChunkFlatController it's a little faster too, now a win across the board:

Slowdown bench
-1.59% desk_youtubetvbrowse.skp
-2.56% desk_googlehome.skp
-6.40% tabl_androidpolice.skp
-6.45% desk_youtubetvvideo.skp
-6.91% tabl_googlecalendar.skp
...
-29.70% desk_yahoogames.skp
-32.17% desk_googlespreadsheet.skp
-32.23% mobi_wikipedia.skp
-37.16% desk_chalkboard.skp
-41.57% desk_pokemonwiki.skp
Overall slowdown: -22.74%

running bench [640 480] picture_record_recurring_paint_dictionary NONRENDERING: cmsecs = 9.92
running bench [640 480] picture_record_unique_paint_dictionary NONRENDERING: cmsecs = 22.16
running bench [640 480] picture_record_dictionaries NONRENDERING: cmsecs = 9.18

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=10328

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

Author: mtklein@google.com

Review URL: https://chromiumcodereview.appspot.com/19564007

git-svn-id: http://skia.googlecode.com/svn/trunk@10336 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
5174286bc5697e290d052fed994e8759fa5a4ed3 24-Jul-2013 mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Start from scratch on a faster SkFlatDictionary."

This reverts commit fec9bfa02d5d2b27bfa2dad3e37e5825a720784d.

git-svn-id: http://skia.googlecode.com/svn/trunk@10331 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
cae5d8d5705081cb4d22af7a30be0f01bffce745 24-Jul-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Start from scratch on a faster SkFlatDictionary.

This is like codereview.chromium.org/19276003, except it fits in better with the existing code, doesn't leak memory, and because it's back using SkChunkFlatController it's a little faster too, now a win across the board:

Slowdown bench
-1.59% desk_youtubetvbrowse.skp
-2.56% desk_googlehome.skp
-6.40% tabl_androidpolice.skp
-6.45% desk_youtubetvvideo.skp
-6.91% tabl_googlecalendar.skp
...
-29.70% desk_yahoogames.skp
-32.17% desk_googlespreadsheet.skp
-32.23% mobi_wikipedia.skp
-37.16% desk_chalkboard.skp
-41.57% desk_pokemonwiki.skp
Overall slowdown: -22.74%

running bench [640 480] picture_record_recurring_paint_dictionary NONRENDERING: cmsecs = 9.92
running bench [640 480] picture_record_unique_paint_dictionary NONRENDERING: cmsecs = 22.16
running bench [640 480] picture_record_dictionaries NONRENDERING: cmsecs = 9.18

BUG=
R=tomhudson@google.com, reed@google.com, scroggo@google.com

Author: mtklein@google.com

Review URL: https://chromiumcodereview.appspot.com/19564007

git-svn-id: http://skia.googlecode.com/svn/trunk@10328 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
c490f801b063a0837501feab3d12b73d71f46312 04-Mar-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Change random number generator for 'tests' to SkMWCRandom. Also removes some
unused headers and fixes a couple of bugs exposed by changing the random
number generator:

First, the function SkMatrix::getMaxStretch() had an error where it was testing
the square of a number against near-zero. This led to it occasionally taking a
cheaper but imprecise path for computing the eigenvalues of the matrix. It's
been replaced with a check against the square of SK_ScalarNearlyZero.

The second case was a failure in ClipStackTest, where it hit the rare case of
a practically empty clip stack (it has a single Union) and we set a tight
bounds. The bounds rect doesn't get set by GrReducedClip::ReduceClipStack() in
this case, so when it clips the reduced stack it's clipping against garbage,
and the resulting regions don't match. The solution is to initialize the
tightBounds rect.


git-svn-id: http://skia.googlecode.com/svn/trunk@7952 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
e16efc1882ab34a0bb3ae361a2d37f840044cf87 26-Jan-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
b89a03c890668f98d9f8b269b6ad00824409435b 22-Dec-2012 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@6930 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
5595af1b2ebe6590e98641464d43d22281a7f295 21-Dec-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> unify how we handle externally-provided storage in SkWriter32, with the goal
of simplifying the logic in reserve() so it can be inlined/accelerated.
Review URL: https://codereview.appspot.com/6962048

git-svn-id: http://skia.googlecode.com/svn/trunk@6923 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
d7e27822030b5ab7729e32c6d29227210dfe88ab 31-Aug-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> truncate our llist w/ null during rewind.



git-svn-id: http://skia.googlecode.com/svn/trunk@5375 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
a27096b4740775ae141fd0abaf456d706065c5ee 30-Aug-2012 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Nightly_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@5346 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
1cf58d03a87e1ff17cd47e9de3da4c678456618d 30-Aug-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add SkWriter32::rewindToOffset() -- used for peephole edits in picture recording



git-svn-id: http://skia.googlecode.com/svn/trunk@5345 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
d6176b0dcacb124539e0cfd051e6d93a9782f020 23-Aug-2012 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)

This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054

git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
dd3948899725041bf52e3a4eea922f9961ee0a9b 24-Jul-2012 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Avoid a loop in writeString and writePad by zeroing padding first.

Also add a benchmark to time the new improved writeString. Before
my change the bench took ~1.23ms and afterwards it takes ~.95ms.

Add some testing to ensure that writePad works properly.

TEST=Writer32Test, WriterBench

Review URL: https://codereview.appspot.com/6438045

git-svn-id: http://skia.googlecode.com/svn/trunk@4742 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
e9617eb352483bf152dfd3a38083ffb99c4694b9 23-Jul-2012 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> In SkWriter32::writeString, initialize all memory reserved.

SkFlatData compares data which is sometimes created by writeString.
Initialize all the memory in writeString so it does not compare
uninitialized memory.

See http://code.google.com/p/skia/issues/detail?id=721&thanks=721

Review URL: https://codereview.appspot.com/6428054

git-svn-id: http://skia.googlecode.com/svn/trunk@4715 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
51c62a6cfadc302bb65bb5a98e358c93223dc73f 12-Jun-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add readPtr and writePtr to SkReader32 and SkWriter32
add template helper SkSWriter32, which allocates initial storage buffer
Review URL: https://codereview.appspot.com/6299075

git-svn-id: http://skia.googlecode.com/svn/trunk@4237 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
e49aca968ca27d90ca919a972a86839ecaf1224a 24-Apr-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add optional storage parameter to SkWriter32



git-svn-id: http://skia.googlecode.com/svn/trunk@3759 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976e 28-Jul-2011 epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Automatic update of all copyright notices to reflect new license terms.

I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.

The following files still need to be modified manually, in a separate CL:

android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058

git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp
dde0956375e87027df2fdd80d430dd819c217aac 23-May-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add cross-process option to gpipe
add unittests for reader32 and writer32



git-svn-id: http://skia.googlecode.com/svn/trunk@1397 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/Writer32Test.cpp