History log of /external/skia/src/core/SkMallocPixelRef.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2c4e75cc3c0302e0e151d90c74b4c476bfa8a8b5 21-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead.

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

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14289 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
8b0e8ac5f582de80356019406e2975079bf0829d 30-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactor read and write buffers.

Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer
a step each in the hierarchy.

What used to be this:

SkFlattenableWriteBuffer -> SkOrderedWriteBuffer
SkFlattenableReadBuffer -> SkOrderedReadBuffer
SkFlattenableReadBuffer -> SkValidatingReadBuffer

is now

SkWriteBuffer
SkReadBuffer -> SkValidatingReadBuffer

Benefits:
- code is simpler, names are less wordy
- the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed
- write buffers are completely devirtualized, important for record speed

This refactoring was mostly mechanical. You aren't going to find anything
interesting in files with less than 10 lines changed.

BUG=skia:
R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
d2ac07b64b7d46e81d00d389781f9f83810f0095 25-Jan-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@13181 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
a8c7f7702fb4bbedb615031bc653c5cd161a038e 24-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> fix (some) 64bit warnings -- size_t -> int

BUG=skia:
R=mtklein@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13178 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
9ebcac54635cde63110d73ad7c43d70772e7872f 24-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add installPixels

BUG=skia:
R=halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13174 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
d0419b1fe781ed21d4aa0dc80df6b3e79ed37e46 06-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "Revert "Revert of https://codereview.chromium.org/110593003/"""

This reverts commit aaa89649590323fe40f52439d9a9a3376bb3b8ae.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12910 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
7627c657b039ea9aa2a01a7d74e652fe7e27def4 06-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add rowBytes param to setPreLock, in prep for onNewLockPixels change

need _win.cc change from https://codereview.chromium.org/124503002/ when this lands in chrome

R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12907 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
ba82bd11e2c055f885b2327aa230d2dac8b53f03 06-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "Revert of https://codereview.chromium.org/110593003/""

This reverts commit 0fef787f33aa38109a0c8427e0098d997efdd5ff.

failed in chrome: https://codereview.chromium.org/124503002/

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12906 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
98272d91421c52211e0e0137f494c1cad01c3c68 04-Jan-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@12901 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
927138977fa256a6719baf74221882555b24008f 03-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of https://codereview.chromium.org/110593003/"

This reverts commit c7abb25b25ba8b97948371d2bf0a2e3e78468f73.

and fixes the ashmem break

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12887 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
27f890219b09e4774da75e6a11ec82849eadae5a 03-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/110593003/
Reason for revert: SkImageRef_ashmem doesn't compile

R=halcanary@google.com, scroggo@google.com
TBR=halcanary@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12884 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
f1ce05288a8fee6e691c3dff5db9dcd47818060f 03-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add onNewLockPixels, that returns rowbytes and relies on info in pixelref

This reverts commit 890a6ec633c1f54891104a072a8964b4c2c81af9.

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12883 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
1bed687f6b8fc67336f0f5d6fb5a5b38dd0fdff9 02-Jan-2014 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add a release procedure to SkMallocPixelRef; remove SkDataPixelRef

This works in a way that is similar to SkData.

SkMallocPixelRef::NewWithProc

Motivation: Chrome has a ETC1PixelRef which calls delete[] on the
pixles on destruction. There is no reason for them to almost
duplicate our class, when we can provide them a more flexible
class. Example use:

static void delete_uint8_proc(void* ptr, void*) {
delete[] static_cast<uint8_t>(ptr);
}
SkPixelRef* new_delete_pixref(const SkImageInfo& info,
SkColorTable* ctable) {
size_t rb = info.minRowBytes();
return SkMallocPixelRef::NewWithProc(
info, rb, ctable,
new uint8_t[info.getSafeSize(rb)],
delete_uint8_proc, NULL);
}

SkMallocPixelRef::NewWithData

Motivation: This allows up to eliminate SkDataPixelRef. We
modified SkImage_Raster to use MallocPixelRef rather than
SkDataPixlRef.

Also: Unit tests in tests/MallocPixelRefTest.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12861 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
fbd9b17711e6f86853f1c5fdb76efce1b9f52bd1 30-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fixing crash found by fuzzer

A previous fix only partially fixed this issue by adding validation on some inputs of SkImageInfo. If anything invalid is detected in SkImageInfo, unfortunately, this can cause getSafeSize() to do an illegal memory access while calling bytesPerPixel(), which could have a bad color type at this point.

A possible fix is to simply make sure we are in a valid state before calling getSafeSize().

BUG=329254
R=reed@google.com, mtklein@google.com, bsalomon@google.com, sugoi@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12844 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
57212f9469c8056bab3c85243dbb904e386eab95 30-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of https://codereview.chromium.org/113823003/"

This reverts commit 68b4b32066ea0ba9dbb5d326a836f8a54297b7aa.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12842 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
4ad4ae907fa83773f671137b0e4e8c9525ab81cd 30-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/113823003/
Reason for revert: need to update callsites in linux codecs

R=robertphillips@google.com
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12841 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
a306d93cd73c3fc1d81479cbba98638f1e055385 30-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove Sk64 from public API, and start to remove usage internally

BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12840 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
ef74fa189b738e13295d6a96f86a6e10223505a8 17-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fixed more fuzzer issues

- Added the "isAvailable" function to check how much bytes are remaining in the stream before doing potentially large mallocs. That way, we can signal a bad stream instead of crashing.
- Added data validation in SkImageInfo.cpp
- Added NULL pointer check in displacement
- Modified the fuzzer for randomized bitmap types

BUG=328934,329254
R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12723 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
96f5fa02e996e39179f2eb88d57e8ed6114b06c5 16-Dec-2013 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@12685 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
bf790232f6d94b54239dbc210d8beee7411ca458 13-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Update all callsites to use info for pixelrefs

#define SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR in chrome to keep old API signature (for now)

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12677 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
0daa1adb03b4b1fc11d854cb7754416ac05a31e8 13-Dec-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12665 & r12666 (Remove duplicate impl for SkImageInfo flattening) due to Chromium/Blink compilation errors

https://codereview.chromium.org/112603003/



git-svn-id: http://skia.googlecode.com/svn/trunk@12667 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
93b40594b78ab40170b5a7fa0811fa95ab8fc30f 13-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remvoe duplicate impl for SkImageInfo flattening
Add onNewLockPixels

This reverts commit bb8eff6a70c52b7644391cfd4f4d21bf7294a6bf.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12665 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
398337b3a5d66a7db5d36a3b5182e4407e2292f7 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "remvoe duplicate impl for SkImageInfo flattening"

Reason: breaks chrome_mac_tests which still have non-imageinfo constructors

This reverts commit a06b8cf60b39bda93e9ef1a73579007b2b930d29.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12631 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
a0d183d89160e31962e99475abe8a77c30626a40 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of https://codereview.chromium.org/108773003/"

This reverts commit 947e6a3142af66b750f1247ef933b11ed8455dd4.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12630 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
ff9c6c92e5f962b34f7421e67ac112f81a018bd3 11-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/108773003/
Reason for revert: breaks chrome-mac-tests

TBR=
NOTREECHECKS=true
NOTRY=true

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12629 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
f3aead2829fa515f790631ee65784a7b9b073343 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remvoe duplicate impl for SkImageInfo flattening

Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""""""

This reverts commit eabd6b2ed4e494b323c08f32358f45950a0368c3.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12624 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
6a32add491cc736aab95561d137909cd7c5d65ef 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""""

This reverts commit d08eca87a0bef10112a211de540f89656a80b86a.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12623 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
6965a0a2df9d35cd0a25e1738f0388272d03f399 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""""

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12622 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
2ebc10dd12a6fe55fda37a9bd5b1e0c1c1e08232 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""

This reverts commit 5f035e90d6dea0139a4f204b634e7b7b3b4976d7.

Reverting because it breaks chrome/blink due to new SkPixelRef constructor arg.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12551 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
473f0aa2bb218e50fce5e19063f8c8fdaf57fad4 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""

This reverts commit 4174afb18a9746bbad2a06c0ec2d4ad35f72d790.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12547 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
5b132b28da61e89cdcb84e95f30a58f8184739fc 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."

This reverts commit 154e08b2f5904ef533da694e3510befcb9a3f3e2.

revert due to warnings

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12538 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
3e89524e747b513986abfeeea00b6fac79593f26 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12537 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
025128811219dc45fd99b6c4d1d14f833cf7a26e 31-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Adding size parameter to read array functions

In some cases, the allocated array into which the data will be read is using getArrayCount() to allocate itself, which should be safe, but some cases use fixed length arrays or compute the array size before reading, which could overflow if the stream is compromised.

To prevent that from happening, I added a check that will verify that the number of bytes to read will not exceed the capacity of the input buffer argument passed to all the read...Array() functions.

I chose to use the byte array for this initial version, so that "size" represents the same value across all read...Array() functions, but I could also use the element count, if it is preferred.

Note : readPointArray and writePointArray are unused, so I could also remove them

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

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12058 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
e0e1da34f3c00ec93c61643d4cf4eea6d27c5fef 15-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove SkColorTable from SkFlattenable hierarchy.

BUG=
R=reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11791 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
a0c2bc24381fea063008f9c8823756eb020603b3 21-Sep-2012 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make flattenables no longer depend on global static initializers.

Instead, force all builds to call InitializeFlattenables.

Remove the make_debugger script, which was created to force
rebuilding without global static initializers so that all flattenables
would be linked. It is no longer necessary since all flattenables
will be linked thanks to InitializeFlattenables, which now can (and
must) be called when global static initializers are turned on.

BUG=https://code.google.com/p/skia/issues/detail?id=903
BUG=https://code.google.com/p/skia/issues/detail?id=902

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

git-svn-id: http://skia.googlecode.com/svn/trunk@5642 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 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 I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
c73dd5c6880739f26216f198c757028fd28df1a4 07-Aug-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Update SkFlattenable buffers to be more modular.

This CL is an effort to stage the conversion to named
parameters for all SkFlattenable commands. This particular
stage only does the following two things...

1. Move flattenable buffers from SkFlattenable.h into
their own header.
2. Update and Add new read write methods for better clarity
and convenience.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
c84b8335ee4fd864c30a4703afc643cf4b5010d9 27-Jul-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reapply "Remove Bitmaps Raw Pixel Support."

This CL reapplies r4722. Now that we have addressed the issues
in Chrome tests that were causing asserts to be fired.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4804 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
56f8f338b6d2f9c75bfb045db51405fcab351cd0 26-Jul-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Remove Bitmaps Raw Pixel Support."

BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4780 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
c1d1f414a08de25d8cbf4ba08fc64d701ffca32e 23-Jul-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove Bitmaps Raw Pixel Support.

bitmap.setPixels(...) now creates a mutable pixelRef instead
of just setting fPixels.
Review URL: https://codereview.appspot.com/6419044

git-svn-id: http://skia.googlecode.com/svn/trunk@4722 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
64a0ec36555352ec31aa7c5a7630a5d042b010ba 12-Jun-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Move SkColorTable into its own header and reduce includes in SkFlattenable.h
Review URL: https://codereview.appspot.com/6299072

git-svn-id: http://skia.googlecode.com/svn/trunk@4236 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
ff0da4ff483ba7b4468b862949ffb3de505cba14 17-May-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Mutexes in pixelrefs were done very sloppily initially. The code (a) assumes all
pixelref subclasses want a mutex to guard their lock/unlock virtuals, and (b)
most subclasses use the same mutex for *all* of their instances, even when there
is no explicit need to guard modifying one instances with another.

When we try drawing bitmaps from multiple threads, we are seeing a lot of slow-
down from these mutexes. This CL has two changes to try to speed things up.

1. Add setPreLocked(), for pixelrefs who never need the onLockPixels
virtual to be called. This speeds up those subclasses in multithreaded environs
as it avoids the mutex lock all together (e.g. SkMallocPixelRef).

2. Add setMutex() to allow a subclass to change the mutex choice. ashmem wants
this, since its unflattening constructor cannot pass down the null, it needs
to cleanup afterwards.
Review URL: https://codereview.appspot.com/6199075

git-svn-id: http://skia.googlecode.com/svn/trunk@3985 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
54924243c1b65b3ee6d8fa064b50a9b1bb2a19a5 29-Mar-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Cleanup code related to SkFlattenable::flatten()

The following changes were made by this CL:

1. Make flatten() a protected method as callers should use
SkFlattenableWriteBuffer to flatten an object
2. Make flatten a const method (including subclasses)
3. Mark subclass implementation of flatten with SK_OVERRIDE
4. Ensure overridden flatten impls call their parent
5. Remove no-op implementations of flatten from subclasses

Additionally, if necessary the unflattening constructor was
also moved to the protected section of the subclasses
header if it was not already there.

git-svn-id: http://skia.googlecode.com/svn/trunk@3540 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
5370cd969d8f3957e4306068e6195ac1bca3d6cd 28-Mar-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Consolidate PixelRef flattables with the standard impl

The flatten method on these functions can no longer be
const as SkFlattenables declaration is not const and
would result in the const methods only being called when
the reference to the object was const.
Review URL: https://codereview.appspot.com/5941043

git-svn-id: http://skia.googlecode.com/svn/trunk@3533 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
d26147adbbdca85f07dff432025afee0c8614387 15-Dec-2011 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add optional manual global initialization

M include/effects/SkAvoidXfermode.h
M include/effects/SkDiscretePathEffect.h
M include/effects/Sk1DPathEffect.h
M include/effects/Sk2DPathEffect.h
M include/effects/SkBlurDrawLooper.h
M include/effects/SkPixelXorXfermode.h
M include/effects/SkDashPathEffect.h
M include/effects/SkColorMatrixFilter.h
M include/effects/SkEmbossMaskFilter.h
M include/effects/SkLayerDrawLooper.h
M include/effects/SkGroupShape.h
M include/effects/SkBlurImageFilter.h
M include/effects/SkRectShape.h
A include/effects/SkEffects.h
M include/effects/SkCornerPathEffect.h
M include/effects/SkGradientShader.h
M include/effects/SkBlurMaskFilter.h
M include/effects/SkLayerRasterizer.h
M include/core/SkMallocPixelRef.h
M include/core/SkFlattenable.h
M include/core/SkShape.h
M include/core/SkPixelRef.h
M include/core/SkGraphics.h
M include/core/SkPathEffect.h
M include/core/SkPostConfig.h
M include/core/SkXfermode.h
M include/core/SkColorFilter.h
M include/images/SkFlipPixelRef.h
M include/images/SkImageRef_GlobalPool.h
M src/effects/SkDashPathEffect.cpp
M src/effects/SkColorMatrixFilter.cpp
M src/effects/SkBlurImageFilter.cpp
M src/effects/SkGroupShape.cpp
M src/effects/SkCornerPathEffect.cpp
M src/effects/SkGradientShader.cpp
M src/effects/SkBlurMaskFilter.cpp
M src/effects/SkAvoidXfermode.cpp
M src/effects/Sk2DPathEffect.cpp
M src/effects/SkBlurDrawLooper.cpp
M src/effects/SkPixelXorXfermode.cpp
M src/effects/SkColorFilters.cpp
M src/effects/SkLayerDrawLooper.cpp
M src/effects/SkRectShape.cpp
A src/effects/SkEffects.cpp
M src/effects/SkLayerRasterizer.cpp
M src/effects/SkDiscretePathEffect.cpp
M src/effects/Sk1DPathEffect.cpp
A src/effects/SkEffects_none.cpp
M src/core/SkPixelRef.cpp
M src/core/SkGraphics.cpp
M src/core/SkFlattenable.cpp
M src/core/SkBitmapProcShader.h
M src/core/SkPathEffect.cpp
M src/core/SkShape.cpp
M src/core/SkXfermode.cpp
M src/core/SkMallocPixelRef.cpp
M src/core/SkBitmapProcShader.cpp
M src/images/SkFlipPixelRef.cpp
M src/images/SkImageRef_GlobalPool.cpp
A src/ports/SkGlobalInitialization_chromium.cpp
M src/ports/SkImageRef_ashmem.h
M src/ports/SkImageRef_ashmem.cpp
A src/ports/SkGlobalInitialization_default.cpp
M gyp/effects.gyp
M gyp/tools.gyp
M gyp/ports.gyp



git-svn-id: http://skia.googlecode.com/svn/trunk@2876 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.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/src/core/SkMallocPixelRef.cpp
82065d667f64e232bcde2ad849756a6096fcbe6f 07-Feb-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites with
SkSafeRef() and SkSafeUnref().

This is basically a bug waiting to happen. An optimizing compiler can remove
checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on
precisely this check...

void SkRefCnt::safeRef() {
if (this) {
this->ref();
}
}

Since a compiler might skip the if-clause, it breaks the intention of this
method, hence its removal.

static inline void SkSafeRef(SkRefCnt* obj) {
if (obj) {
obj->ref();
}
}

This form is not ignored by an optimizing compile, so we use it instead.




git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp
49099b25367d1b9ef45ccaa7fe370facea6b89bf 09-Sep-2010 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> move SkMallocPixelRef into its own .cpp file, rather than embedding it
inside SkBitmap.cpp.

core_files.mk updated, but if your build does not reference that, you will
need to add SkMallocPixelRef.cpp to your list



git-svn-id: http://skia.googlecode.com/svn/trunk@597 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkMallocPixelRef.cpp