skia2/include/core
wjmaclean@chromium.org 86bff1f008 Add safe size/copy functions to Skia.
This patch adds four methods to SkBitmap. There are two functions to return
    "safe size", defined as the number of pixels from the value returned by
    getPixels() to the end of the allocated buffer.

    There is one version of fillPixels() to copy the bitmap instance into an
    external buffer (with specified size, and using specified stride), and another
    fillPixels() to copy from an external buffer to the instance bitmap. In the
    latter case the specified height, width and pixel format must match that used by
    the bitmap instance, although the specified stride may be any value at least as
    large as the minimum stride for the specified geometry. It is assumed that the
    external buffer is of size at least (height - 1)*stride + width *
    bytesPerPixel.

    Both fillPixels() functions return false if the copy is not possible with the
    specified parameters.

    Review URL: http://codereview.appspot.com/2837041/

git-svn-id: http://skia.googlecode.com/svn/trunk@625 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-11-16 20:22:41 +00:00
..
Sk64.h more tests (need more meat in there) 2009-02-27 22:06:06 +00:00
SkAutoKern.h first cut at event-based test app 2008-12-19 18:24:35 +00:00
SkBitmap.h Add safe size/copy functions to Skia. 2010-11-16 20:22:41 +00:00
SkBlitRow.h remove const modifiers on function return types (unneeded, and caused an error 2009-11-13 19:00:49 +00:00
SkBlitter.h first cut at event-based test app 2008-12-19 18:24:35 +00:00
SkBounder.h convert matrix <--> matrix44 2010-03-01 14:54:05 +00:00
SkBuffer.h grab from latest android 2008-12-17 15:59:43 +00:00
SkCanvas.h Fix a memory leak in the new Canvas/Device workflow. 2010-10-15 18:58:19 +00:00
SkChunkAlloc.h Add SkChunkAlloc::unalloc() to undo the last allocation, useful if the caller wants to treat the allocats like temp memory (see PictureRecord) 2009-03-30 21:02:14 +00:00
SkColor.h Make SKColorSetARGB() a macro when not building debug. 2010-07-28 17:10:30 +00:00
SkColorFilter.h remove deprecated use of porterduff enum 2009-06-23 03:01:32 +00:00
SkColorPriv.h fix dither-to-4444 to keep the alpha value >= colors 2010-04-06 21:03:33 +00:00
SkColorShader.h add shader flag kConstInY_Flag 2009-06-12 21:27:03 +00:00
SkComposeShader.h grab from latest android 2008-12-17 15:59:43 +00:00
SkDeque.h grab from latest android 2008-12-17 15:59:43 +00:00
SkDescriptor.h grab from latest android 2008-12-17 15:59:43 +00:00
SkDevice.h Remove include of SkGLDevice.h from SkGLCanvas.h 2010-11-11 00:49:41 +00:00
SkDither.h grab from latest android 2008-12-17 15:59:43 +00:00
SkDraw.h Fix SkDraw::validate to work with vector Devices. 2010-10-26 19:44:10 +00:00
SkDrawFilter.h grab from latest android 2008-12-17 15:59:43 +00:00
SkDrawLooper.h grab from latest android 2008-12-17 15:59:43 +00:00
SkEdgeClipper.h new scanconversion technique 2009-11-18 16:09:51 +00:00
SkEndian.h grab from latest android 2008-12-17 15:59:43 +00:00
SkFDot6.h grab from latest android 2008-12-17 15:59:43 +00:00
SkFixed.h grab from latest android 2008-12-17 15:59:43 +00:00
SkFlattenable.h grab from latest android 2008-12-17 15:59:43 +00:00
SkFloatBits.h grab from latest android 2008-12-17 15:59:43 +00:00
SkFloatingPoint.h add copysign for ints and floats 2010-02-09 18:30:59 +00:00
SkFontHost.h Add a SkTypeface::CreateForChars() function. 2010-04-20 22:06:40 +00:00
SkGeometry.h Added optional "ambiguous" outgoing argument to XRay queries so that 2010-07-07 22:20:35 +00:00
SkGlobals.h grab from latest android 2008-12-17 15:59:43 +00:00
SkGraphics.h add SKIA_VERSION_[MAJOR, MINOR, PATCH] in header and SkGraphics API 2010-04-13 13:22:54 +00:00
SkLineClipper.h retool clipping in hairlines to catch huge coordinates 2009-11-19 20:46:39 +00:00
SkMallocPixelRef.h grab from latest android 2008-12-17 15:59:43 +00:00
SkMask.h Remove assertion in getAddrLCD. 2009-08-11 17:21:21 +00:00
SkMaskFilter.h grab from latest android 2008-12-17 15:59:43 +00:00
SkMath.h add copysign for ints and floats 2010-02-09 18:30:59 +00:00
SkMatrix.h Cleanup/unify matrix transform for PDF backend. 2010-10-26 19:45:06 +00:00
SkMMapStream.h fix multiple warnings (e.g. hidden virtuals, unused static functions) 2009-01-14 16:46:16 +00:00
SkOSFile.h make this header public (at least for now) 2008-12-18 19:04:43 +00:00
SkPackBits.h grab from latest android 2008-12-17 15:59:43 +00:00
SkPaint.h PDF: Add text support with a font framework (font embedding to come). 2010-11-11 21:37:00 +00:00
SkPath.h add countPoints() and getPoint() 2010-02-09 16:38:45 +00:00
SkPathEffect.h grab from latest android 2008-12-17 15:59:43 +00:00
SkPathMeasure.h migrate more legacy unittests into tests/ 2009-03-07 03:39:23 +00:00
SkPerspIter.h grab from latest android 2008-12-17 15:59:43 +00:00
SkPicture.h add picture-record option to speedup complex clips 2009-02-13 14:56:09 +00:00
SkPixelRef.h add abstract wrapper for platform-specific bitmap backends 2010-09-09 16:01:26 +00:00
SkPoint.h add some utils to SkPoint 2010-01-28 21:34:33 +00:00
SkPostConfig.h remove conditional build flag for mipmaps 2009-07-17 02:42:41 +00:00
SkPreConfig.h remove obsolete SK_BUILD_FOR_BREW conditional 2010-01-12 22:58:35 +00:00
SkPtrRecorder.h grab from latest android 2008-12-17 15:59:43 +00:00
SkRandom.h grab from latest android 2008-12-17 15:59:43 +00:00
SkRasterizer.h grab from latest android 2008-12-17 15:59:43 +00:00
SkReader32.h grab from latest android 2008-12-17 15:59:43 +00:00
SkRect.h add SkRegion::setRects(), and its unit tests 2010-07-13 18:35:14 +00:00
SkRefCnt.h dox 2010-04-16 20:56:00 +00:00
SkRegion.h add SkRegion::setRects(), and its unit tests 2010-07-13 18:35:14 +00:00
SkScalar.h PDF: Add text support with a font framework (font embedding to come). 2010-11-11 21:37:00 +00:00
SkScalarCompare.h fix (aaaargh) white-space 2009-07-08 15:11:19 +00:00
SkScalerContext.h Clamp the maximum size of glyph width we will attempt to render. 2010-10-18 23:29:36 +00:00
SkScan.h fix warnings 2009-01-15 14:38:33 +00:00
SkShader.h expand SkShader's flag kConstInY to 16 and 32 variants, allowing a shader 2009-08-27 19:28:37 +00:00
SkShape.h add shape flatten so they work properly in pictures 2009-06-29 16:02:20 +00:00
SkSize.h rename round, ceil, etc. to avoid some platform macros 2010-06-15 00:57:50 +00:00
SkStream.h Several cleanups: 2010-10-26 19:48:49 +00:00
SkString.h High level pdf classes and pdf specific interface. 2010-10-12 23:08:13 +00:00
SkStroke.h grab from latest android 2008-12-17 15:59:43 +00:00
SkTDArray.h add detach() method 2009-08-25 16:03:59 +00:00
SkTDict.h grab from latest android 2008-12-17 15:59:43 +00:00
SkTDStack.h add boolean tests and IF/ELSE/END 2009-08-30 03:24:51 +00:00
SkTemplates.h grab from latest android 2008-12-17 15:59:43 +00:00
SkThread_platform.h Fix 64-bit Mac warnings/memory corruption 2010-05-18 21:23:30 +00:00
SkThread.h grab from latest android 2008-12-17 15:59:43 +00:00
SkTime.h grab from latest android 2008-12-17 15:59:43 +00:00
SkTRegistry.h rename tests/main to testmain.cpp 2009-04-01 20:26:42 +00:00
SkTSearch.h migrate more legacy unittests into tests/ 2009-03-07 03:39:23 +00:00
SkTypeface.h Add a SkTypeface::CreateForChars() function. 2010-04-20 22:06:40 +00:00
SkTypes.h PDF: Add text support with a font framework (font embedding to come). 2010-11-11 21:37:00 +00:00
SkUnitMapper.h grab from latest android 2008-12-17 15:59:43 +00:00
SkUnPreMultiply.h grab from latest android 2008-12-17 15:59:43 +00:00
SkUtils.h More SSE2-ification; fix for gcc -msse2. 2009-11-16 21:09:00 +00:00
SkWriter32.h grab from latest android 2008-12-17 15:59:43 +00:00
SkXfermode.h move xfermode modes from porterduff into xfermode itself 2009-06-22 17:38:10 +00:00