aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicturePlayback.h
Commit message (Collapse)AuthorAge
...
* Only print error message in debug mode.Gravatar scroggo@google.com2013-02-28
| | | | | | | | | | | | | Currently, PictureTest runs a test of recording a bad bitmap to a picture and then replaying the picture. We assert at the record step in debug mode, so the test only runs in release, to ensure that we can still play back a picture, even if it has a bad bitmap. Silence the error message in release, so our test doesn't appear to error (since it is actually working as desired). Review URL: https://codereview.chromium.org/12315138 git-svn-id: http://skia.googlecode.com/svn/trunk@7897 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove bogus ability for creating an SkPicturePlayback to fail.Gravatar scroggo@google.com2013-02-25
| | | | | | | | | | | | | | | | | | | Change SkPicturePlayback::parseBufferTag to return void, since it can never return false. Change SkPicturePlayback::parseStreamTag to return void, since the only way it can return false is if parseBufferTag returns false, or if creating a sub picture failed, both of which are nonsensical. Due to the above, there is no reason for creating an SkPicturePlayback to fail, so remove the isValid parameter. Update subclasses in SkDebuggerGUI. Review URL: https://codereview.appspot.com/7388050 git-svn-id: http://skia.googlecode.com/svn/trunk@7844 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkSerializationHelpers.Gravatar scroggo@google.com2013-02-22
| | | | | | | | | | Move the function definition for EncodeBitmap to SkPicture, where InstallPixelRefProc has already moved (and where it is relevant). Review URL: https://codereview.appspot.com/7386053 git-svn-id: http://skia.googlecode.com/svn/trunk@7837 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create SkLazyPixelRef which performs lazy decoding.Gravatar scroggo@google.com2013-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new pixel ref behaves similarly to SkImageRef, with some key differences: It does not depend on the images project. It requires an SkImageCache, which handles allocation and caching of the pixel memory. It takes a function signature for decoding which decodes into already allocated pixel memory rather than into an SkBitmap. Add two implementations of SkImageCache: SkLruImageCache and SkAshmemImageCache. Replace SkSerializationHelpers::DecodeBitmap with SkPicture::InstallPixelRefProc, and update sites that referenced it. SkBitmapFactory now sets the pixel ref to a new object of the new class SkLazyPixelRef, provided it has an SkImageCache for caching. Provide an option to do lazy decodes in render_pictures and bench_pictures. SkPicture: Eliminate the default parameters in the constructor. If a proc for decoding bitmaps is installed, use it to decode any encoded data in subpictures. When parsing deserializing subpictures, check for success. When serializing subpictures, pass the picture's bitmap encoder to the subpicture's call to serialize. Update BitmapFactoryTest to test its new behavior. BUG=https://code.google.com/p/skia/issues/detail?id=1008 BUG=https://code.google.com/p/skia/issues/detail?id=1009 Review URL: https://codereview.appspot.com/7060052 git-svn-id: http://skia.googlecode.com/svn/trunk@7835 2bbb7eff-a529-9590-31e7-b0007b416f81
* Only support SkPicture abort for Android due to the fragility of the ↵Gravatar djsollen@google.com2013-02-01
| | | | | | | | existing API Review URL: https://codereview.appspot.com/7225083 git-svn-id: http://skia.googlecode.com/svn/trunk@7515 2bbb7eff-a529-9590-31e7-b0007b416f81
* Switch debugger profiling stubs over to being guarded by SK_DEVELOPERGravatar robertphillips@google.com2013-01-17
| | | | | | | | https://codereview.appspot.com/7134053/ git-svn-id: http://skia.googlecode.com/svn/trunk@7246 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-12-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6774 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 6766, thereby re-landing 6762-6763 now that the bots are readyGravatar reed@google.com2012-12-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6770 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 6762-6763, since those require new skps to be generated, and we can'tGravatar reed@google.com2012-12-12
| | | | | | | | do that immediately right now... will re-submit when we can. git-svn-id: http://skia.googlecode.com/svn/trunk@6766 2bbb7eff-a529-9590-31e7-b0007b416f81
* make RRect and Oval first-class drawing primitives in SkCanvas.Gravatar reed@google.com2012-12-12
| | | | | | | add RRect as a first-class clip primitive. Review URL: https://codereview.appspot.com/6923058 git-svn-id: http://skia.googlecode.com/svn/trunk@6762 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make debugger profiling honor deleted commandsGravatar robertphillips@google.com2012-12-07
| | | | | | | | https://codereview.appspot.com/6906043/ git-svn-id: http://skia.googlecode.com/svn/trunk@6713 2bbb7eff-a529-9590-31e7-b0007b416f81
* Handle recording a bitmap if copy fails.Gravatar scroggo@google.com2012-12-04
| | | | | | | | | | | If SkBitmapHeap::insert() returns INVALID_SLOT, assert at picture record time so we can debug, but allow it to continue in release mode, so that we can still capture a picture. At playback time, print a message so we know that there was an error. Review URL: https://codereview.appspot.com/6873050 git-svn-id: http://skia.googlecode.com/svn/trunk@6664 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added profiling stubs to SkPicturePlaybackGravatar robertphillips@google.com2012-11-13
| | | | | | | | https://codereview.appspot.com/6851044/ git-svn-id: http://skia.googlecode.com/svn/trunk@6397 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add the ability to provide function pointers to SkPicture serializationGravatar scroggo@google.com2012-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and deserialization for encoding and decoding bitmaps. Remove kForceFlattenBitmapPixels_Flag, which is no longer used. When an SkOrderedReadBuffer needs to read a bitmap, if it does not have an image decoder, use a dummy bitmap. In GM, add a tolerance option for color differences, used when testing picture serialization, so it can assume two images are the same even though PNG encoding/decoding may have resulted in small differences. Create dummy implementations for SkImageDecoder and SkImageEncoder functions in SkImageDecoder_empty so that a project that does not want to include the images project it can still build. Allow ports to build without images project. In Mac's image encoder, copy 4444 to 8888 before encoding. Add SkWriter32::reservePad, to provide a pointer to write non 4 byte aligned data, padded with zeroes. In bench_ and render_ pictures, pass decode function to SkPicture creation from a stream. BUG=https://code.google.com/p/skia/issues/detail?id=842 Review URL: https://codereview.appspot.com/6551071 git-svn-id: http://skia.googlecode.com/svn/trunk@5818 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add R-Tree record flag to SkPicture, plus some cleanup/fixes in associated ↵Gravatar rileya@google.com2012-09-13
| | | | | | | | classes. Review URL: https://codereview.appspot.com/6506103 git-svn-id: http://skia.googlecode.com/svn/trunk@5537 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement multi-threaded picture playback via cloning.Gravatar djsollen@google.com2012-08-29
| | | | | | | | | | | | | | The CL adds SkPicture.clone() which produces a thread-safe copy by creating a shallow copy of the thread-safe data within the picture and a deep copy of the data that is not (e.g. SkPaint). This implementation re-flattens the paints when cloning instead of retaining the flattened paints from the recording process. Changes were also needed to various classes to ensure thread safety Review URL: https://codereview.appspot.com/6459105 git-svn-id: http://skia.googlecode.com/svn/trunk@5335 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | 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
* Refactor Bitmap Storage for SkPicture using SkPipe's design.Gravatar djsollen@google.com2012-08-07
| | | | | | | | | | | | | | | | | | | | | Refactor Picture and Pipe bitmap storage into common data structure 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/6445079 git-svn-id: http://skia.googlecode.com/svn/trunk@4994 2bbb7eff-a529-9590-31e7-b0007b416f81
* Store more behavior of SkFlatDictionary in SkFlatController.Gravatar scroggo@google.com2012-08-02
| | | | | | | | Code refactoring for simplicity. Review URL: https://codereview.appspot.com/6427046 git-svn-id: http://skia.googlecode.com/svn/trunk@4929 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkTRefArray to share readonly data between picturesGravatar reed@google.com2012-07-23
| | | | | | Review URL: https://codereview.appspot.com/6351121 git-svn-id: http://skia.googlecode.com/svn/trunk@4720 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkData to share between record and playbackGravatar reed@google.com2012-07-21
| | | | | | | | use SkReader32 on the stack, as a step towards thread-reentrant playback git-svn-id: http://skia.googlecode.com/svn/trunk@4711 2bbb7eff-a529-9590-31e7-b0007b416f81
* Expand header in serialized picturesGravatar reed@google.com2012-06-22
| | | | | | | | Make chunk/tag reading allow for optional and (somewhat) out-of-order chunks. Return empty picture instead of throwing on error Review URL: https://codereview.appspot.com/6329049 git-svn-id: http://skia.googlecode.com/svn/trunk@4308 2bbb7eff-a529-9590-31e7-b0007b416f81
* add PictInfo chunk to serialized picturesGravatar reed@google.com2012-06-22
| | | | | | Review URL: https://codereview.appspot.com/6325048 git-svn-id: http://skia.googlecode.com/svn/trunk@4302 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unecessary virtual calls by having SkPicture use SkReader32 directly.Gravatar djsollen@google.com2012-04-18
| | | | | | Review URL: https://codereview.appspot.com/6048046 git-svn-id: http://skia.googlecode.com/svn/trunk@3722 2bbb7eff-a529-9590-31e7-b0007b416f81
* Decouple the SkFlattenable from SkReader32/SkWriter32.Gravatar djsollen@google.com2012-04-12
| | | | | | | | | | The current impl for SkFlattenable read/write buffers is that they extend from SkReader32 and SkWriter32, but that dependency must be abstract if we are to add any other serialization format. Review URL: https://codereview.appspot.com/5999045 git-svn-id: http://skia.googlecode.com/svn/trunk@3654 2bbb7eff-a529-9590-31e7-b0007b416f81
* Formatting cleanup: remove extra whitespaceGravatar vandebo@chromium.org2012-01-28
| | | | | | | | Change by arthurhsu@chromium.org, original CL: http://codereview.appspot.com/5587049/ Review URL: https://codereview.appspot.com/5594043 git-svn-id: http://skia.googlecode.com/svn/trunk@3098 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update files to use SK_BUILD_FOR_ANDROID.Gravatar djsollen@google.com2011-11-08
| | | | | | | | This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 2bbb7eff-a529-9590-31e7-b0007b416f81
* use templated skipT() for skipping structs within a readerGravatar reed@google.com2011-09-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2238 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove drawShape from canvas apiGravatar reed@google.com2011-06-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1723 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream android changes.Gravatar djsollen@google.com2011-04-15
| | | | | | | reviewed by: reed git-svn-id: http://skia.googlecode.com/svn/trunk@1134 2bbb7eff-a529-9590-31e7-b0007b416f81
* add shape recording to pictuures (sans serialization)Gravatar reed@android.com2009-06-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@240 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81