Commit Graph

103 Commits

Author SHA1 Message Date
reed@google.com
5f62ed7434 no need to refcnt colortables, since pixelrefs own them
BUG=skia:
R=halcanary@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13098 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 19:59:45 +00:00
commit-bot@chromium.org
e13af711d4 Revert of https://codereview.chromium.org/132643007/
Reason for revert: broken tests

TBR=
NOTREECHECKS=true
NOTRY=true
BUG=

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13058 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:39:14 +00:00
reed@google.com
f0b56e7448 Revert "Revert of https://codereview.chromium.org/129423002/"
fixed new api references in unit tests

This reverts commit ffc0058e1fbcbd69617e1f41b2dce5b5765ff99e.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13057 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:28:50 +00:00
commit-bot@chromium.org
9b06ba4c91 Revert of https://codereview.chromium.org/129423002/
Reason for revert: broke tests (compile)

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

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13056 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:23:48 +00:00
reed@google.com
dd9ea9262c add SkBitmap::installPixelRef()
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13055 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:17:58 +00:00
reed@google.com
f3abaeb0c5 remove (now unused) Sk64 -- just use int64_t
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13032 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-10 22:05:41 +00:00
skia.committer@gmail.com
1ae9111f33 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12980 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-09 07:01:42 +00:00
reed@google.com
672588b684 change offset to xy for pixelref subsetting
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12958 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 15:42:01 +00:00
reed@google.com
57212f9469 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
2013-12-30 14:40:38 +00:00
commit-bot@chromium.org
4ad4ae907f 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
2013-12-30 14:24:37 +00:00
reed@google.com
a306d93cd7 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
2013-12-30 14:14:42 +00:00
reed@google.com
9230ea2971 make info real in SkPixelRef, and add bitmap::asImageInfo
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12586 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-09 22:01:03 +00:00
reed@google.com
2ebc10dd12 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
2013-12-06 21:43:05 +00:00
reed@google.com
473f0aa2bb 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
2013-12-06 20:31:45 +00:00
reed@google.com
5b132b28da 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
2013-12-06 18:51:08 +00:00
reed@google.com
3e89524e74 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
2013-12-06 18:41:33 +00:00
rmistry@google.com
d6bab02386 Reverting r12427
git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:50:38 +00:00
skia.committer@gmail.com
5b39f5ba9c Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:36:22 +00:00
commit-bot@chromium.org
11f392ed53 Revert "Revert "remove kA1_Config, as it is no longer supported""
This reverts commit 36d712f2d4c5c79719280ad95523e6aaa88b068e.

BUG=
R=rmistry@google.com, mtklein@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12392 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-26 12:51:57 +00:00
reed@google.com
72e7808d62 Revert "remove kA1_Config, as it is no longer supported"
This reverts commit 2d72d8b242eac6e9d30228f5b0a407236491c369.

git-svn-id: http://skia.googlecode.com/svn/trunk@12387 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 20:54:56 +00:00
reed@google.com
2a1f4464d1 remove kA1_Config, as it is no longer supported
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12384 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 18:58:29 +00:00
commit-bot@chromium.org
eddb02c82d Adding SkDeferredCanvas::NoticifationClient to the exported API.
R=reed@android.com, robertphillips@google.com, reed, robertphillips
BUG=1861

Author: schenney@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12380 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 15:44:37 +00:00
mtklein@google.com
0f6dc21e32 Revert SK_REQUIRE_LOCAL_VAR changes for DEPS roll.
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12306 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 20:55:29 +00:00
commit-bot@chromium.org
e61a86cfa0 Guard against most unintentionally ephemeral SkAutoFoo instantiations.
I think I applied the trick everywhere possible.  Limitations:
    - can't be used with templated classes
    - all constructors and destructors must be defined inline

A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I
deleted them.  This change caught the same bugs Cary found in SkPath, plus one
more in SampleApp.

BUG=
R=reed@google.com, caryclark@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-18 16:03:59 +00:00
reed@google.com
3443fd8886 move SkImageInfo into its own header
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12273 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-13 19:09:13 +00:00
commit-bot@chromium.org
21a0b10d7c Remove deprecated setIsOpaque() API from SkBitmap.
Clients we care (Blink, Chromium) were updated, so we can remove this now.

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

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12251 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 18:16:34 +00:00
commit-bot@chromium.org
6e3e42296b Break up SkLazyPixelRef functionally into class hierarchy.
The reason for this CL is to allow greater decoder flexibility.
Chrome currently uses its own decoding functions.  These allow for
greater flexibility in dealing with images with multiple frames or
partial data.  The DecodeProc function was not flexible enough to
handle these.  Instead of asking the decoder to squeeze everything
into the DecodeProc, we now ask the downstream library to inherit from
SkCachingPixelRef.  If WebKit's LazyDecodingPixelRef is re-tooled to
inherit from SkCachingPixelRef, then it can make use of Skia's caching
ability while still allowing it to deal with multiple frames, scaling,
subsetting, and partial data.

-   The abstract SkCachingPixelRef class handles caching the decoded
    data in a SkScaledImageCache.  This class relies on the virtual
    functions onDecodeInfo() and onDecode() to do the actual decoding
    of data.

-   The SkLazyCachingPixelRef class is derived from SkCachingPixelRef.
    It provides an implementation of onDecodeInfo() and onDecode() in
    terms of calls to a SkBitmapFactory::DecodeProc function.  It also
    provides an Install() static method which installs a new
    SkLazyCachingPixelRef into a SkBitmap.

SkLazyCachingPixelRef exists for two reasons: to test
SkCachingPixelRef within Skia and as an example for downstream
developers to make their own classes that inherit from
SkCachingPixelRef.

-   The CachedDecodingPixelRefTest was updated to test the
    SkLazyCachingPixelRef class and indirectly the SkCachingPixelRef
    class.

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

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12149 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-06 10:08:30 +00:00
reed@google.com
4469938e92 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
2013-10-31 17:28:30 +00:00
reed@google.com
6fcbfcead5 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
2013-10-31 16:31:11 +00:00
reed@google.com
081560e3ab 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
2013-10-31 16:24:08 +00:00
reed@google.com
383a697692 store SkAlphaType inside SkBitmap, on road to support unpremul
BUG=
R=bsalomon@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11877 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 14:00:07 +00:00
reed@google.com
0a6151d66c Revert "Revert "change SkColorTable to be immutable""
This reverts commit b8162cb840f4cb6002ef68d5ac775c6a122c52a9.

Fixed was call-sites in benches that used the (now gone) setIsOpaque api.

R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11695 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 14:44:56 +00:00
reed@google.com
48d9ff5b34 Revert "change SkColorTable to be immutable"
This reverts commit 1c0ff422868b3badf5ffe0790a5d051d1896e2f7.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11677 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 16:49:45 +00:00
reed@google.com
9864c24e40 change SkColorTable to be immutable
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11676 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 16:34:47 +00:00
robertphillips@google.com
24ddde9758 Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11257 Canary build fix - https://codereview.chromium.org/23532068
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 14:04:05 +00:00
robertphillips@google.com
ba6e954140 Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on changes in r11247)
git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:40:12 +00:00
robertphillips@google.com
478884f7d3 Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:19:11 +00:00
commit-bot@chromium.org
5792cded61 Initial error handling code
I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=
R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11247 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 12:39:34 +00:00
skia.committer@gmail.com
1f3c73825b Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10223 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-20 07:00:58 +00:00
humper@google.com
138ebc3e40 The image resampling code has been transplanted from Chrome; it's incredibly fast.
We've tested this CL plumbed into Chrome and done benchmarking with excellent results.

This CL can land independent of any Chrome changes; it's completely internal to skia.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10206 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 20:20:04 +00:00
skia.committer@gmail.com
9e1ec1a529 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9948 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-10 07:00:58 +00:00
humper@google.com
b088947f27 New bitmap filter checkin; this time with less build breakage
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9944 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 21:37:14 +00:00
humper@google.com
1a8940e558 Revert "More general image filter interface; tested implementation of standalone"
This reverts commit 4df3e8b079e019af5f60c13e7e6ec6589663962a.

git-svn-id: http://skia.googlecode.com/svn/trunk@9937 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 18:02:06 +00:00
humper@google.com
25fc6b9bfb More general image filter interface; tested implementation of standalone
image scaler (not yet plumbed).  High quality downsampler.  Fast SSE
resampler.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9936 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 17:48:15 +00:00
reed@google.com
60d3235ab4 add bitmap::eraseArea
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9815 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-28 19:40:50 +00:00
skia.committer@gmail.com
52394d2ef7 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9786 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-27 07:00:58 +00:00
reed@google.com
4a551d49cf struct != class, even in a friend forward declare
git-svn-id: http://skia.googlecode.com/svn/trunk@9783 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-26 21:28:10 +00:00
reed@google.com
2c31a4678d move legacy mipmap apis to private, save one that is currently called by chrome. It will go soon...
git-svn-id: http://skia.googlecode.com/svn/trunk@9782 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-26 21:09:37 +00:00
commit-bot@chromium.org
b8d00db075 Change undefined SkGpuRenderTarget and SkGpuTexture forward declares to GrRenderTarget and GrTexture.
R=robertphillips@google.com, reed@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9775 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-26 19:18:23 +00:00
reed@google.com
2cb1480ff8 remove kRLE_Index8_Config from SkBitmap
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9764 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-26 14:35:02 +00:00