aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
Commit message (Collapse)AuthorAge
* Update all callsites to use info for pixelrefsGravatar reed@google.com2013-12-13
| | | | | | | | | | | #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
* Reverting r12665 & r12666 (Remove duplicate impl for SkImageInfo flattening) ↵Gravatar robertphillips@google.com2013-12-13
| | | | | | | | | | 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
* Remvoe duplicate impl for SkImageInfo flatteningGravatar reed@google.com2013-12-13
| | | | | | | | | | | | 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
* Revert "remvoe duplicate impl for SkImageInfo flattening"Gravatar reed@google.com2013-12-11
| | | | | | | | | | | | 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
* remvoe duplicate impl for SkImageInfo flatteningGravatar reed@google.com2013-12-11
| | | | | | | | | | | | 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
* Revert "PixelRef now returns (nearly) everything that is currently in ↵Gravatar reed@google.com2013-12-11
| | | | | | | | | | | | 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
* PixelRef now returns (nearly) everything that is currently in SkBitmap. The ↵Gravatar reed@google.com2013-12-11
| | | | | | | | | | 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
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12590 2bbb7eff-a529-9590-31e7-b0007b416f81
* make info real in SkPixelRef, and add bitmap::asImageInfoGravatar reed@google.com2013-12-09
| | | | | | | | | 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
* Revert "Revert "Revert "PixelRef now returns (nearly) everything that is ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | | | 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
* Revert "Revert "PixelRef now returns (nearly) everything that is currently ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | 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
* Revert "PixelRef now returns (nearly) everything that is currently in ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | 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
* PixelRef now returns (nearly) everything that is currently in SkBitmap. The ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | 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
* Fix compilation with SK_ENABLE_INST_COUNT=1Gravatar commit-bot@chromium.org2013-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add INHERITED declarations to class declarations that prevent compilation with the flag. Remove SK_DEFINE_INST_COUNT from all class implementations. Instead, use function-local static variables in the reference count helper classes to create the global instances to store the needed info. The accessor functions are defined inline in the helper classes, so definitions are not needed. The initialization point of the variables should be as well defined as previously. Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT instead. This avoids possible future compilation errors further. For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member function to all classes that use SK_DECLARE_INST_COUNT and SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes contain public INHERITED typedef. This member function seems to be compiled away. This shouĺd ensure that part of the compilation errors are caught earlier. Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses. R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/98703002 git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed bad bitmap size crashesGravatar commit-bot@chromium.org2013-12-04
| | | | | | | | | | | | | | | There were 2 issues : 1 ) If the size of an SkBitmap's underlying SkPixelRef's alocated memory is too small to fit the bitmap, then the deserialization will now check this and set an error appropriately. 2 ) If a device fails to allocate its pixels, the device will be deleted and NULL will be returned to avoid attempting to draw on a bad device. BUG= R=senorblanco@chromium.org, reed@google.com, sugoi@google.com, halcanary@google.com, mtklein@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/92793002 git-svn-id: http://skia.googlecode.com/svn/trunk@12484 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkImageInfo into its own headerGravatar reed@google.com2013-11-13
| | | | | | | | | 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
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-11-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12261 2bbb7eff-a529-9590-31e7-b0007b416f81
* add colortable enum to SkImage to ease interop between it and SkBitmap::ConfigGravatar reed@google.com2013-11-12
| | | | | | | | | BUG= R=halcanary@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/68853003 git-svn-id: http://skia.googlecode.com/svn/trunk@12245 2bbb7eff-a529-9590-31e7-b0007b416f81
* Break up SkLazyPixelRef functionally into class hierarchy.Gravatar commit-bot@chromium.org2013-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* move SkImage::ColorType into SkColorTypeGravatar reed@google.com2013-11-01
| | | | | | | | | | | | | | | | | | objective -- move clients over to SkImage tasks - use SkImageInfo instead of SkBitmap::Config - add support for colortables to SkImage - add drawImage to SkCanvas - return SkImage from readPixels This CL works towards the first task R=robertphillips@google.com Review URL: https://codereview.chromium.org/54363008 git-svn-id: http://skia.googlecode.com/svn/trunk@12077 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11903 2bbb7eff-a529-9590-31e7-b0007b416f81
* store SkAlphaType inside SkBitmap, on road to support unpremulGravatar reed@google.com2013-10-21
| | | | | | | | | 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
* SkData need not be a Flattenable, since it does not need subclass/factoriesGravatar reed@google.com2013-10-14
| | | | | | | | | BUG= R=mtklein@google.com Review URL: https://codereview.chromium.org/26928002 git-svn-id: http://skia.googlecode.com/svn/trunk@11754 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11426 2bbb7eff-a529-9590-31e7-b0007b416f81
* promote SkImage::AlphaType to SkAlphaTypeGravatar reed@google.com2013-09-20
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/24130009 git-svn-id: http://skia.googlecode.com/svn/trunk@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
* My clang now doesn't complain about !"foo".Gravatar mtklein@google.com2013-08-22
| | | | | | | | | BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/22875037 git-svn-id: http://skia.googlecode.com/svn/trunk@10874 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkImage_Gpu share it's pixelref with the surface to prevent premature ↵Gravatar commit-bot@chromium.org2013-07-25
| | | | | | | | | | | | | | return to scratch pool. BUG=crbug.com/263329 TEST=Surface unit test, function Test_crbug263329 R=bsalomon@google.com, reed@google.com Author: junov@chromium.org Review URL: https://chromiumcodereview.appspot.com/20354003 git-svn-id: http://skia.googlecode.com/svn/trunk@10378 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10299 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkImage->draw() call with src and dst rects.Gravatar commit-bot@chromium.org2013-07-23
| | | | | | | | | | | | Committed: http://code.google.com/p/skia/source/detail?r=10237 R=junov@chromium.org, senorblanco@chromium.org, reed@google.com Author: arbesfeld@chromium.org Review URL: https://chromiumcodereview.appspot.com/19729007 git-svn-id: http://skia.googlecode.com/svn/trunk@10274 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Add SkImage->draw() call with src and dst rects."Gravatar fmalita@google.com2013-07-22
| | | | | | This reverts commit 9c730e27e0bb550dc228ad496cadeed8787b2244. git-svn-id: http://skia.googlecode.com/svn/trunk@10238 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkImage->draw() call with src and dst rects.Gravatar commit-bot@chromium.org2013-07-22
| | | | | | | | | | R=junov@chromium.org, senorblanco@chromium.org, reed@google.com Author: arbesfeld@chromium.org Review URL: https://chromiumcodereview.appspot.com/19729007 git-svn-id: http://skia.googlecode.com/svn/trunk@10237 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a 'unique' method to SkRefCnt, document the usage, and add support.Gravatar bungeman@google.com2013-07-19
| | | | | | | | | | | | | | | | | | std::shared_ptr has a method called 'unique' which captures the concept that a reference count of 1 is special, and can be used to optimize copy on write. It also has some undocumented need for memory barriers in certain situations and those needs are documented here. The motivation for looking into this is crbug.com/258499 . The use of the reference count in this manner is a benign race with both ref() and unref(). By introducing sk_atomic_unprotected_read, it is possible for Chromium to annotate this read to tell ThreadSanitizer that this is known. R=bsalomon@google.com Review URL: https://codereview.chromium.org/18770007 git-svn-id: http://skia.googlecode.com/svn/trunk@10221 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change undefined SkGpuRenderTarget and SkGpuTexture forward declares to ↵Gravatar commit-bot@chromium.org2013-06-26
| | | | | | | | | | | | 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
* Force checking of all color, stencil and FBO allocations for SkSurface_Gpu. ↵Gravatar senorblanco@chromium.org2013-06-10
| | | | | | | | | | This fixes the software canvas fallback in Chrome. R=bsalomon@google.com Review URL: https://codereview.chromium.org/15643013 git-svn-id: http://skia.googlecode.com/svn/trunk@9487 2bbb7eff-a529-9590-31e7-b0007b416f81
* Separate core and images project.Gravatar scroggo@google.com2013-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkImage calls functions on SkImageDecoder and SkImageEncoder. This is desired behavior, and it is also desired to include SkImage as a part of core. In order to keep core from depending on images, update SkImageDecoder_empty.cpp to implement all of SkImageDecoder and SkImageEncoder. This file will be built by chrome (in https://codereview.chromium.org/15960015). Move force_linking from SkImageDecoder.cpp to its own file. It must be called to force linking with the image decoders if desired. Call the function in tools that need it: sk_image render_pictures render_pdfs sk_hello filter bench_pictures debugger SkImageDecoder: Derive from SkNoncopyable, instead of duplicating its hiding of constructors. skhello: Return rather than trying to write a null SkData to the stream. Revert "Hamfistedly removed core dependence on images" (commit 0f05f682a90bc125323677abf3476e1027d174f5) and "Move SkImage::encode to SkImage_Codec.cpp." (commit 83e47a954d0bf65439f3d9c0c93213063dd70da3.) These two commits were temporary fixes that this change cleans up. SkSnapshot.cpp: Check for a NULL encoder returned by SkImageEncoder::Create. BUG=https://code.google.com/p/skia/issues/detail?id=1275 R=djsollen@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/15806010 git-svn-id: http://skia.googlecode.com/svn/trunk@9364 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9207 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkImage::encode to SkImage_Codec.cpp.Gravatar commit-bot@chromium.org2013-05-20
| | | | | | | | | | | | | | | | | Chrome depends on SkImage.cpp, but does not include SkImageDecoder, so having SkImage::encode in SkImage.cpp breaks chromium. Temporarily fix the problem by moving the implementation into SkImage_Codec.cpp. The larger fix will be to solve https://code.google.com/p/skia/issues/detail?id=1275 R=reed@google.com, robertphillips@google.com Author: scroggo@google.com Review URL: https://chromiumcodereview.appspot.com/15314004 git-svn-id: http://skia.googlecode.com/svn/trunk@9204 2bbb7eff-a529-9590-31e7-b0007b416f81
* add encodeData() to SkImageEncoder, and add encoding to SkImageGravatar reed@google.com2013-05-20
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/15002004 git-svn-id: http://skia.googlecode.com/svn/trunk@9193 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8948 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding public API method on SkImage for extracting the GPU texture handle.Gravatar junov@chromium.org2013-05-01
| | | | | | | | TEST=Surface unit test Review URL: https://codereview.chromium.org/14646007 git-svn-id: http://skia.googlecode.com/svn/trunk@8945 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding optimization to avoid image copy in SkSurface copy on write when ↵Gravatar commit-bot@chromium.org2013-04-22
| | | | | | | | | | | | | | | content is discardable This patch also adds code to SkDeferredCanvas to trigger the optimization. TEST=DeferredSurfaceCopy bench, Surface unit test R=reed@google.com Author: junov@chromium.org Review URL: https://chromiumcodereview.appspot.com/14063015 git-svn-id: http://skia.googlecode.com/svn/trunk@8797 2bbb7eff-a529-9590-31e7-b0007b416f81
* Build fix: moving more inline functions into headerGravatar junov@chromium.org2013-04-16
| | | | | | TBR=reed git-svn-id: http://skia.googlecode.com/svn/trunk@8710 2bbb7eff-a529-9590-31e7-b0007b416f81
* Build fix: moving some inline function definitions into header.Gravatar junov@chromium.org2013-04-16
| | | | | | TBR=reed git-svn-id: http://skia.googlecode.com/svn/trunk@8709 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup: Removing unnecessary args/complexity in SkSurface_Base and friendsGravatar junov@chromium.org2013-04-16
| | | | | | Review URL: https://codereview.chromium.org/14263017 git-svn-id: http://skia.googlecode.com/svn/trunk@8708 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing viral copy/paste typo Shapshot -> SnapshotGravatar junov@chromium.org2013-04-12
| | | | | | Unreviewed git-svn-id: http://skia.googlecode.com/svn/trunk@8667 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed bug in SkSurface_Gpu to make the surface receive the new copy when copyGravatar junov@chromium.org2013-04-11
| | | | | | | on write happens. Review URL: https://codereview.chromium.org/13195002 git-svn-id: http://skia.googlecode.com/svn/trunk@8622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed bug with SkImage leaving canvas backing store in an immutable state ↵Gravatar junov@chromium.org2013-04-03
| | | | | | | | | after destroy. Added unit test that verifies that surface backing is writable after creating and destroying an image. Review URL: https://codereview.chromium.org/13226002 git-svn-id: http://skia.googlecode.com/svn/trunk@8512 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replacing 'new' with 'SkNEW_ARGS' in SkImage_GpuGravatar junov@chromium.org2013-04-03
| | | | | | Review URL: https://codereview.chromium.org/13535004 git-svn-id: http://skia.googlecode.com/svn/trunk@8509 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a few clang errors while trying to build tools target.Gravatar tfarina@chromium.org2013-03-26
| | | | | | | | | | | | | Most of the errors were like: ../../src/gpu/gl/GrGLEffectMatrix.cpp:74:9: error: variable 'varyingType' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] ../../src/gpu/gl/debug/GrDebugGL.h:125:21: error: private field 'fMaxTextureUnits' is not used [-Werror,-Wunused-private-field] ../../src/core/SkBitmapSampler.cpp:312:25: error: private field 'fProcTable' is not used [-Werror,-Wunused-private-field] R=bsalomon@google.com,scroggo@google.com Review URL: https://codereview.chromium.org/12915007 git-svn-id: http://skia.googlecode.com/svn/trunk@8403 2bbb7eff-a529-9590-31e7-b0007b416f81
* Removed unused parametersGravatar sugoi@google.com2013-03-11
| | | | | | | I removed unused parameters wherever it was trivial to do so. Review URL: https://codereview.chromium.org/12469002 git-svn-id: http://skia.googlecode.com/svn/trunk@8068 2bbb7eff-a529-9590-31e7-b0007b416f81