aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureRecord.cpp
Commit message (Collapse)AuthorAge
* remove legacy build-guards, now that webkit has rebaselined these.Gravatar reed@google.com2012-11-26
| | | | | | | | | | | | | | | | | | SK_DISABLE_FAST_AA_STROKE_RECT SK_IGNORE_FAST_BLURRECT SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX SK_IGNORE_CF_OPTIMIZATION SK_IGNORE_NEW_STROKERECT SK_DISABLE_GPU_BLUR SK_IGNORE_ROTATED_FREETYPE_FIX The changes should all be: remove code for #ifdef remove guard for #ifndef Review URL: https://codereview.appspot.com/6858073 git-svn-id: http://skia.googlecode.com/svn/trunk@6546 2bbb7eff-a529-9590-31e7-b0007b416f81
* Convert clipPaths to clipRects where possible in pictureRecordGravatar robertphillips@google.com2012-11-07
| | | | | | | | https://codereview.appspot.com/6820104/ git-svn-id: http://skia.googlecode.com/svn/trunk@6325 2bbb7eff-a529-9590-31e7-b0007b416f81
* catch empty stack in restorefixup called by clipRectGravatar reed@google.com2012-10-02
| | | | | | | | write stress-test for save/clip/restore peephole optimization git-svn-id: http://skia.googlecode.com/svn/trunk@5774 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable peephole optimization for save/clip/restore, with build flagGravatar reed@google.com2012-10-02
| | | | | | | | SK_DISABLE_PICTURE_PEEPHOLE_OPTIMIZATION to disable it (optional) git-svn-id: http://skia.googlecode.com/svn/trunk@5770 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove call to setBitmapDevice (deprecated).Gravatar reed@google.com2012-09-27
| | | | | | Review URL: https://codereview.appspot.com/6569070 git-svn-id: http://skia.googlecode.com/svn/trunk@5715 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-re-land 5578Gravatar reed@google.com2012-09-18
| | | | | | | | will follow w/ new .skp files to keep the waterfall green (I hope) git-svn-id: http://skia.googlecode.com/svn/trunk@5584 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 5580Gravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5581 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-land 5578 w/ pipe fixGravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5580 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 5578 -- broke pipeGravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5579 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change drawBitmapRect to take a float-src-rect instead of integer-src-rect. ThisGravatar reed@google.com2012-09-18
| | | | | | | | | | | | | | | | | | allows the client more control over the scaling. Because of virtual overrides and wanting to keep the old call-sites up and running, this CL renames the virtual entry-point to drawBitmapRectToRect, and downgrades drawBitmapRect to a non-virtual helper function. The implementation is to use the float-rect for computing the matrix, but still cons-up an integer rect for the purposes of subsetting the original bitmap. We do this by calling float_src->roundOut(&int_src) so that we include all (partially) covered src pixels. No change needed on SkDevice, since that signature is explicitly passed the computed matrix. Review URL: https://codereview.appspot.com/6501140 git-svn-id: http://skia.googlecode.com/svn/trunk@5578 2bbb7eff-a529-9590-31e7-b0007b416f81
* speculative fix for crbug.com/147406 -- disabling save/clip/restore peepholeGravatar reed@google.com2012-09-14
| | | | | | | | optimization, to see if it reduces crash rates. git-svn-id: http://skia.googlecode.com/svn/trunk@5556 2bbb7eff-a529-9590-31e7-b0007b416f81
* Address warnings from clang build botGravatar robertphillips@google.com2012-09-13
| | | | | | | | http://codereview.appspot.com/6506111/ git-svn-id: http://skia.googlecode.com/svn/trunk@5518 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkBBoxRecord subclass that builds up a BBoxHierarchy and PictureStateTree.Gravatar rileya@google.com2012-09-11
| | | | | | Review URL: https://codereview.appspot.com/6490104 git-svn-id: http://skia.googlecode.com/svn/trunk@5500 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-08-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5373 2bbb7eff-a529-9590-31e7-b0007b416f81
* peephole optimize save/restore brackets that contain no draw calls.Gravatar reed@google.com2012-08-30
| | | | | | Review URL: https://codereview.appspot.com/6443149 git-svn-id: http://skia.googlecode.com/svn/trunk@5347 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
* Always store pixels of mutable bitmaps when recording a SkPicture.Gravatar djsollen@google.com2012-07-27
| | | | | | | | | | | | | | | | | | | | | | | Prior to this CL mutable bitmaps only saved a copy of their pixels if a flag was set at recording time. That flag has been removed and the default behavior when recording a mutable bitmap is to make a copy of it's pixels. This is the only way to ensure that the pixels are not manipulated before we playback their contents. However, enabling this behavior breaks the recording of extracted bitmaps in SkPicture. This is because we currently cache bitmaps within a picture based only on their pixelRef. This results in false positive cache hit when drawing an extracted bitmap as it shares a pixelRef with its orginating bitmap. Therefore we must update the index of the bitmap cache to be both the pixelRef AND the size and offset of the bitmap using those pixels. BUG= TEST=extractbitmap.cpp Review URL: https://codereview.appspot.com/6439043 git-svn-id: http://skia.googlecode.com/svn/trunk@4809 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkFlatDictionary in SkGPipe to take advantage of its new features.Gravatar scroggo@google.com2012-07-17
| | | | | | | | | | | | Add a controller class to perform the allocation/unallocation for the dictionary and to provide an entry to be replaced, if replacements are allowed. TODO: Use LRU caching in my custom controller so replacements will be done less often. More refactoring on SkFlatDictionary so picture recording's use of the dictionary does not require going through the path to replace. Review URL: https://codereview.appspot.com/6345102 git-svn-id: http://skia.googlecode.com/svn/trunk@4639 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding bracketing save/restore calls to SkPicture at record time andGravatar junov@chromium.org2012-07-16
| | | | | | | | | | preparing tests for enforcing save/restore balancing constraints on SkPicture Review URL: http://codereview.appspot.com/6354105/ git-svn-id: http://skia.googlecode.com/svn/trunk@4618 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup restore offsets at end of SkPicture recordingGravatar junov@chromium.org2012-07-12
| | | | | | | | | | Review URL: http://codereview.appspot.com/6355099/ TEST=skia unit test CanvasTest, test step TwoClipOps BUG=https://code.google.com/p/chromium/issues/detail?id=133432 git-svn-id: http://skia.googlecode.com/svn/trunk@4577 2bbb7eff-a529-9590-31e7-b0007b416f81
* check a hashtable before using a bsearchGravatar reed@google.com2012-07-12
| | | | | | Review URL: https://codereview.appspot.com/6345097 git-svn-id: http://skia.googlecode.com/svn/trunk@4572 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactoring code in SkPictureRecord that touches fRestoreOffsetStackGravatar junov@chromium.org2012-07-09
| | | | | | | | | Review URL: http://codereview.appspot.com/6350059/ BUG=http://code.google.com/p/chromium/issues/detail?id=133432 git-svn-id: http://skia.googlecode.com/svn/trunk@4472 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding option to serialize mutable bitmaps in SkPictureGravatar junov@chromium.org2012-06-01
| | | | | | | | | BUG=http://code.google.com/p/chromium/issues/detail?id=115654 REVIEW=http://codereview.appspot.com/6221066/ git-svn-id: http://skia.googlecode.com/svn/trunk@4130 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor dictionaries for use by entities other than just SkPictureGravatar djsollen@google.com2012-05-30
| | | | | | Review URL: https://codereview.appspot.com/6101043 git-svn-id: http://skia.googlecode.com/svn/trunk@4077 2bbb7eff-a529-9590-31e7-b0007b416f81
* can't perform fast top_bottom cull if the text is verticalGravatar reed@google.com2012-04-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3659 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modify SkDeferredCanvas so that it uses its inherited SkCanvas to track ↵Gravatar junov@chromium.org2012-02-24
| | | | | | | | | | | | | | matrix and clipping state Removed 'virtual' from a few canvas methods that no longer need it thanks to this change. BUG=http://code.google.com/p/skia/issues/detail?id=506 TEST=Canvas unit test REVIEW=http://codereview.appspot.com/5697052/ git-svn-id: http://skia.googlecode.com/svn/trunk@3261 2bbb7eff-a529-9590-31e7-b0007b416f81
* reverting r3257 because of gm failure.Gravatar junov@chromium.org2012-02-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3258 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modify SkDeferredCanvas so that it uses its inherited SkCanvas to track ↵Gravatar junov@chromium.org2012-02-24
| | | | | | | | | | | | | | matrix and clipping state Removed 'virtual' from a few canvas methods that no longer need it thanks to this change. BUG=http://code.google.com/p/skia/issues/detail?id=506 TEST=Canvas unit test REVIEW=http://codereview.appspot.com/5697052/ git-svn-id: http://skia.googlecode.com/svn/trunk@3256 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding API and unit testing for deferred canvas clearing/purgingGravatar junov@chromium.org2012-02-13
| | | | | | | | | REVIEW=http://codereview.appspot.com/5646057/ TEST=DeferredCanvas unit test git-svn-id: http://skia.googlecode.com/svn/trunk@3181 2bbb7eff-a529-9590-31e7-b0007b416f81
* extend fastbounds impls to include maskfilters and drawloopers. This allowsGravatar reed@google.com2012-01-30
| | | | | | | | | | us to perform quick-rejects when drawing objects with shadows (esp. text). WebKit draws shadows w/ a looper (fg and shadow) and a maskfilter on the shadow layer. git-svn-id: http://skia.googlecode.com/svn/trunk@3103 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
* Add SkDEBUGFAIL to clean up use of SkASSERT(!"text");Gravatar tomhudson@google.com2011-12-28
| | | | | | | | | | catch a couple of latent SkASSERT("text") bugs. http://codereview.appspot.com/5504090/ git-svn-id: http://skia.googlecode.com/svn/trunk@2926 2bbb7eff-a529-9590-31e7-b0007b416f81
* record doAA param for clipRect and clipPath in picturesGravatar reed@google.com2011-11-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2669 2bbb7eff-a529-9590-31e7-b0007b416f81
* add bool argument to canvas' clipRect and clipPath for antialiasingGravatar reed@google.com2011-10-12
| | | | | | | | (currently ignored) git-svn-id: http://skia.googlecode.com/svn/trunk@2459 2bbb7eff-a529-9590-31e7-b0007b416f81
* add drawBitmapNine to canvasGravatar reed@google.com2011-09-07
| | | | | | | | will add to device soon I think git-svn-id: http://skia.googlecode.com/svn/trunk@2233 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix pictures to not skip-over clip ops that might expand the clipGravatar reed@google.com2011-08-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2187 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
* rename SkPtrRecorder and related wrappers to SkPtrSet, since that is the patternGravatar mike@reedtribe.org2011-04-29
| | | | | | | | is it providing. Also add a templated wrapper to handle typecasting of ptr types. git-svn-id: http://skia.googlecode.com/svn/trunk@1214 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkCanvas::clear(SkColor color) to call the new virtual clear on device.Gravatar reed@google.com2011-04-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1131 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites withGravatar reed@google.com2011-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkSafeRef() and SkSafeUnref(). This is basically a bug waiting to happen. An optimizing compiler can remove checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on precisely this check... void SkRefCnt::safeRef() { if (this) { this->ref(); } } Since a compiler might skip the if-clause, it breaks the intention of this method, hence its removal. static inline void SkSafeRef(SkRefCnt* obj) { if (obj) { obj->ref(); } } This form is not ignored by an optimizing compile, so we use it instead. git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81
* add drawData() to canvas, to record data blobsGravatar reed@android.com2009-12-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@452 2bbb7eff-a529-9590-31e7-b0007b416f81
* oops, restore previous fix to saveLayer calling through to save()Gravatar reed@android.com2009-10-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@375 2bbb7eff-a529-9590-31e7-b0007b416f81
* move factory for 565 into its own fileGravatar reed@android.com2009-10-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@374 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't call through to the inherited saveLayer, but just call save during recordGravatar reed@android.com2009-10-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@373 2bbb7eff-a529-9590-31e7-b0007b416f81
* make a deep copy in CreateCGImageRef if we're 565, but first upscale to 32bit.Gravatar reed@android.com2009-07-10
| | | | | | | | | | | | | this at least draws the right colors, since we're 565 and CG only supports 1555 (unless someone knows how to tell CG we're 565...) Fix ws in picturerecord Enable dither in sample gradients, so the 4444 case isn't so ugly git-svn-id: http://skia.googlecode.com/svn/trunk@264 2bbb7eff-a529-9590-31e7-b0007b416f81
* check for underflow in restore() during picture record, and ignore itGravatar reed@android.com2009-07-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@262 2bbb7eff-a529-9590-31e7-b0007b416f81