skia2/include/core
scroggo@google.com 1b1bcc3cea New API for encoding bitmaps during serialization.
This change gives more flexibility to the implementation of
EncodeBitmap to prefer calling refEncodedData, doing its own
encode, or even doing both and making a decision about which
to use.

The new function signature also allows the implementation to
tell the ordered write buffer whether to store the pixel offset,
in the case where the encoded bitmap represents the larger
bitmap, or to ignore the pixel offset, in the case where the
implementation only encoded the subset that is used.

Requires changes to chromium to use the new function signature.
(https://codereview.chromium.org/15496006/)

SkPicture:
New API for EncodeBitmap.

SkOrderedReadBuffer:
Ifdef'd out addition of reading the offset.

SkOrderedWriteBuffer:
Never call refEncodedData. Allow the user to call that from their
EncodeBitmap function, if desired.
This addresses https://code.google.com/p/skia/issues/detail?id=1239
Add in ifdef'd out code to record the offset.

PictureTest and PictureRenderer:
Implement the new definition of EncodeBitmap. Also update the name
of the function to meet coding style guidelines.

BUG=https://code.google.com/p/skia/issues/detail?id=1239
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9226 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 20:31:23 +00:00
..
Sk64.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkAdvancedTypefaceMetrics.h [PDF] Always set the symbolic Flag for Fonts. 2013-03-13 20:01:51 +00:00
SkAnnotation.h PDF: add support for named destinations. 2013-03-08 09:09:10 +00:00
SkBitmap.h lockPixels before calling getColorTable. 2013-05-06 18:08:05 +00:00
SkBlitRow.h Punctuation cleanup to satisfy idiosyncracies of OpenBSD gcc 4.2.1. 2012-06-01 13:15:47 +00:00
SkBounder.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkCanvas.h path ops : make it real 2013-04-25 13:34:40 +00:00
SkChecksum.h add block comment for using SkChecksum 2013-04-23 15:35:24 +00:00
SkChunkAlloc.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkClipStack.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkColor.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkColorFilter.h Wrap GrEffects in GrEffectPtr. 2013-01-16 15:16:18 +00:00
SkColorPriv.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkColorShader.h Added print out of SkShader information to debugger 2013-01-15 20:17:47 +00:00
SkColorTable.h Implement multi-threaded picture playback via cloning. 2012-08-29 18:52:07 +00:00
SkComposeShader.h Added print out of SkShader information to debugger 2013-01-15 20:17:47 +00:00
SkData.h Move MMap to SkData. 2013-04-24 20:03:00 +00:00
SkDataSet.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkDataTable.h specialize SkDataTable for arrays where all elements are the same size. 2013-04-21 01:37:46 +00:00
SkDeque.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkDevice.h Add GPU support for roundrects 2013-04-25 15:27:00 +00:00
SkDeviceProperties.h Mask orientation and layout correctly. 2013-05-06 22:23:08 +00:00
SkDither.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkDraw.h SkDraw.h #include cleanup 2013-04-03 10:18:17 +00:00
SkDrawFilter.h Add GPU support for roundrects 2013-04-25 15:27:00 +00:00
SkDrawLooper.h Added toString to SkDrawLooper-derived classes 2013-01-28 20:21:59 +00:00
SkEmptyShader.h Added print out of SkShader information to debugger 2013-01-15 20:17:47 +00:00
SkEndian.h SkBitmapHasher: use 64-bit-truncated MD5 instead of 64-bit CityHash 2013-05-03 17:35:39 +00:00
SkError.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-09 07:01:27 +00:00
SkFixed.h first cut at making iOS work 2012-09-20 15:45:41 +00:00
SkFlate.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkFlattenable.h Make flattenables no longer depend on global static initializers. 2012-09-21 17:54:46 +00:00
SkFlattenableBuffers.h Add buffer helper to read directly into SkString to avoid extra copying 2013-05-21 16:17:14 +00:00
SkFloatBits.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkFloatingPoint.h path ops -- use standard max, min, double-is-nan 2013-04-23 11:56:44 +00:00
SkFontHost.h remove SkFontHost::NextLogicalFont, and add android-specific function 2013-03-26 12:29:05 +00:00
SkFontLCDConfig.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-03-13 07:01:04 +00:00
SkGeometry.h add (untested) tangent calc for conics 2013-05-07 20:42:35 +00:00
SkGraphics.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkImage.h add encodeData() to SkImageEncoder, and add encoding to SkImage 2013-05-20 16:33:41 +00:00
SkImageFilter.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-09 07:01:27 +00:00
SkImageFilterUtils.h Allow single-pass filters (which use asNewEffect()) to participate in the image filter DAG. This was done by introducing the SkSinglePassImageFilter abstract base class, which implements canFilterImageGPU() and filterImageGPU() on behalf of the derived class. The derived class still only needs to asNewEffect(). This allows us to recurse on the filter input in SkSinglePassImageFilter::onFilterImageGPU(). It also allows us to remove any knowledge of single-pass image filters from SkGpuDevice and from the SkImageFilter base class as well. 2013-04-08 19:43:22 +00:00
SkImageTypes.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-02-20 07:02:30 +00:00
SkInstCnt.h Removed unused parameters 2013-03-11 18:50:03 +00:00
SkLineClipper.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkMallocPixelRef.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkMask.h Sanitizing source files in Housekeeper-Nightly 2013-05-03 07:01:00 +00:00
SkMaskFilter.h Added toString to SkMaskFilter-derived classes 2013-03-18 17:53:38 +00:00
SkMath.h reenable __builtin_clz for GNUC (and clang), recognizing that it is undefined for a zero argument, 2013-04-29 15:34:35 +00:00
SkMatrix.h First pass at Rect Effect 2013-04-09 14:01:44 +00:00
SkMetaData.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkOSFile.h replace getline with fgets for portability 2013-01-14 19:42:08 +00:00
SkPackBits.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
SkPaint.h API modifications needed to upstream Android font changes. 2013-05-13 14:09:13 +00:00
SkPaintOptionsAndroid.h Add buffer helper to read directly into SkString to avoid extra copying 2013-05-21 16:17:14 +00:00
SkPath.h Sanitizing source files in Housekeeper-Nightly 2013-05-20 11:51:35 +00:00
SkPathEffect.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkPathMeasure.h add SK_API 2013-05-08 13:25:02 +00:00
SkPicture.h New API for encoding bitmaps during serialization. 2013-05-21 20:31:23 +00:00
SkPixelRef.h Fix android errors when unflattening an SkImageRef_ashmem object. 2013-02-01 15:57:13 +00:00
SkPoint.h add asScalars() to document when we want to treat SkPoint or SkRect as an array 2013-03-08 16:07:54 +00:00
SkPostConfig.h Feed Clang a pragma to ignore -Wc++11-extensions to let it build Skia on Mac. 2013-04-22 14:39:06 +00:00
SkPreConfig.h reland 8200 w/ fix for android (use fullpath instead of path) 2013-03-18 21:08:46 +00:00
SkRasterizer.h change all interfaces for SkRasterizer to const, in preparation for marking it 2012-12-18 16:57:03 +00:00
SkReader32.h revert 6766, thereby re-landing 6762-6763 now that the bots are ready 2012-12-12 20:48:18 +00:00
SkRect.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-03-09 07:01:15 +00:00
SkRefCnt.h Remove 'friend SkRefCnt' from SkData. 2013-04-16 15:24:31 +00:00
SkRegion.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkRRect.h Added "SkRRect::contains(const SkRect&) const" 2013-04-25 12:23:00 +00:00
SkScalar.h Fix for displacement mapping 2013-03-19 15:07:30 +00:00
SkScalarCompare.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkShader.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkSize.h must always include another skia header (unless you're SkTypes.h). In this case, 2012-11-26 20:18:00 +00:00
SkStream.h Sanitizing source files in Housekeeper-Nightly 2013-05-08 07:01:40 +00:00
SkString.h Revert r9081 2013-05-09 20:01:26 +00:00
SkStringUtils.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-29 07:05:52 +00:00
SkStrokeRec.h Follow up on the previous patch : 2012-12-17 21:16:45 +00:00
SkSurface.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-23 07:01:29 +00:00
SkTArray.h Take two for r8466: 2013-04-01 20:06:51 +00:00
SkTDArray.h Make SkTDArray accessors const-friendly. 2013-02-28 19:03:13 +00:00
SkTDict.h Make SkTDArray accessors const-friendly. 2013-02-28 19:03:13 +00:00
SkTDStack.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkTemplates.h XPS ttc handling. 2013-05-07 15:28:15 +00:00
SkThread_platform.h explicitly initialize all entries in array of SkBaseMatrix, since we can't say 2013-04-12 15:34:53 +00:00
SkThread.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkTileGridPicture.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-03-01 12:12:55 +00:00
SkTime.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkTInternalLList.h Fix compiler error in SkTInternalList.h 2012-12-03 23:34:32 +00:00
SkTLazy.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-02 07:01:34 +00:00
SkTrace.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkTRegistry.h Update files to use SK_BUILD_FOR_ANDROID. 2011-11-08 19:00:26 +00:00
SkTScopedPtr.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
SkTSearch.h One SkTSearch to rule them all. Allow key to be of different type than the array. 2013-05-17 19:05:03 +00:00
SkTypeface.h Change fixedWidth to fixedPitch and implement on Windows. 2013-03-25 19:36:11 +00:00
SkTypes.h path ops -- use standard max, min, double-is-nan 2013-04-23 11:56:44 +00:00
SkUnitMapper.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkUnPreMultiply.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkUtils.h Fix a few clang errors while trying to build tools target. 2013-03-26 21:48:58 +00:00
SkWeakRefCnt.h more SkInstCnt plumbing 2012-06-26 17:55:30 +00:00
SkWriter32.h fix compiler warnings: 2012-12-24 13:56:17 +00:00
SkXfermode.h Add all remaining separable xfer modes to GPU backend. 2013-04-19 15:03:21 +00:00