aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pipe/SkGPipeWrite.cpp
Commit message (Collapse)AuthorAge
* PDF: add support for named destinations.Gravatar epoger@google.com2013-03-08
| | | | | | | Landing patchset 7 from https://codereview.appspot.com/7374052 for dml@google.com Review URL: https://codereview.chromium.org/12533009 git-svn-id: http://skia.googlecode.com/svn/trunk@8034 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r8000 due to failures on some buildbotsGravatar epoger@google.com2013-03-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8001 2bbb7eff-a529-9590-31e7-b0007b416f81
* PDF: add support for named destinations Gravatar epoger@google.com2013-03-06
| | | | | | | Imported from https://codereview.appspot.com/7374052/ on behalf of dml@google.com Review URL: https://codereview.chromium.org/12466008 git-svn-id: http://skia.googlecode.com/svn/trunk@8000 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
* 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
* 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 II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a parenthesis bug.Gravatar scroggo@google.com2012-08-16
| | | | | | | | | | | | | | | | SkGPipeCanvas::needOpBytes was being called with the wrong value due to a misplaced parens in clipRect and clipPath. This can cause a crash if clip is called at just the right (wrong) time. Instead of writing a boolean to the stream, I have added a flag, which helps to avoid the parens problem. Also renamed some flags from _DrawOpsFlag to _DrawOpFlag for consistency. Lastly, added an assert that the size provided by the SkGPipeController is a multiple of four. Review URL: https://codereview.appspot.com/6453126 git-svn-id: http://skia.googlecode.com/svn/trunk@5134 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing a deferred canvas optimization that purges pending draws when the ↵Gravatar junov@chromium.org2012-08-15
| | | | | | | | | | | | | | | | canvas is cleared It appears that the recording canvas returns a save count of 1 when the save stack is empty. In order to pass Canvas unit tests when a clear occurs, changes to SkGPipe were necessary to allow SkDeferredCanvas to set the device bounds on the SkGPipeCanvas. A positive side effect of this change is that graphics primitives that fall outside of the device bounds will now always be culled at the recording stage (as opposed playback). BUG=http://code.google.com/p/skia/issues/detail?id=782 TEST=deferred_canvas_record bench test Review URL: https://codereview.appspot.com/6454157 git-svn-id: http://skia.googlecode.com/svn/trunk@5117 2bbb7eff-a529-9590-31e7-b0007b416f81
* Ensure that Pipe does not crash when attempting to draw after endRecording.Gravatar scroggo@google.com2012-08-14
| | | | | | | | | | | Add a test for drawing a bitmap and a bitmapshader after endRecording. BUG=https://code.google.com/p/skia/issues/detail?id=774&can=3 Test=PipeTest Review URL: https://codereview.appspot.com/6459088 git-svn-id: http://skia.googlecode.com/svn/trunk@5099 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move write buffer flags used by SkFlataData::Create into SkFlatController.Gravatar scroggo@google.com2012-08-14
| | | | | | Review URL: https://codereview.appspot.com/6446135 git-svn-id: http://skia.googlecode.com/svn/trunk@5091 2bbb7eff-a529-9590-31e7-b0007b416f81
* In SkGPipeCanvas, rename fSharedHeap to fBitmapHeapGravatar scroggo@google.com2012-08-14
| | | | | | | | to reflect the fact that it is only used for storing bitmaps. Review URL: https://codereview.appspot.com/6446134 git-svn-id: http://skia.googlecode.com/svn/trunk@5085 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkBitmapHeap for shaders in SkGPipe.Gravatar scroggo@google.com2012-08-14
| | | | | | | | | | | | | Required adding a new feature to SkBitmapHeap, allowing it to defer adding owners, since sometimes we flatten a shader, but then do not unflatten it, since we already had a copy in the heap, so the owners never get removed. Reviewed at https://codereview.appspot.com/6464053/ Review URL: https://codereview.appspot.com/6465047 git-svn-id: http://skia.googlecode.com/svn/trunk@5082 2bbb7eff-a529-9590-31e7-b0007b416f81
* Check in r5063 again, along with fix for tests.Gravatar scroggo@google.com2012-08-14
| | | | | | | | | | | | | | | | | Thank you to Android build, for catching the problem, which would show up elsewhere. Now we access entry->fStorageSlot before deleting entry. (Original message:) Use the SkBitmapHeap to handle SkBitmaps in SkGPipe cross process. Required moving the LRU handles from SkBitmapHeapEntry to LookupEntry. Allows simplification of drawBitmap* calls in SkGPipeCanvas. Review URL: https://codereview.appspot.com/6453113 git-svn-id: http://skia.googlecode.com/svn/trunk@5081 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r5063 until unit tests can be fixed.Gravatar tomhudson@google.com2012-08-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5067 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use the SkBitmapHeap to handle SkBitmaps in SkGPipe cross process.Gravatar scroggo@google.com2012-08-13
| | | | | | | | | | Required moving the LRU handles from SkBitmapHeapEntry to LookupEntry. Allows simplification of drawBitmap* calls in SkGPipeCanvas. Review URL: https://codereview.appspot.com/6460073 git-svn-id: http://skia.googlecode.com/svn/trunk@5063 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkGPipe use SkBitmapHeap.Gravatar scroggo@google.com2012-08-08
| | | | | | | | | | | | | | In the single process (or hypothetical cross process/shared address space) mode, SkGPipe now uses SkBitmapHeap instead of SharedHeap. Still need to use the shared heap for shaders as well as for cross process. TEST=PipeTest Review URL: https://codereview.appspot.com/6461059 git-svn-id: http://skia.googlecode.com/svn/trunk@5008 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding API to SkGPipe and SkDeferredCanvas for controlling memory usage ↵Gravatar junov@chromium.org2012-08-07
| | | | | | | | | externally BUG=http://code.google.com/p/chromium/issues/detail?id=136828 Review URL: https://codereview.appspot.com/6454102 git-svn-id: http://skia.googlecode.com/svn/trunk@4971 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
* Pipe factory names independently from the flattenables using them.Gravatar scroggo@google.com2012-08-01
| | | | | | | | | | | | | | | | Avoids an issue where a flattenable written twice might be written differently (the first time the flat data may have a name, whereas the second time it will have an index). Also add a test which confirms that identical flattenables will have the same SkFlatData representation. BUG=https://code.google.com/p/skia/issues/detail?id=721 TEST=FlatDataTest.cpp Review URL: https://codereview.appspot.com/6431057 git-svn-id: http://skia.googlecode.com/svn/trunk@4896 2bbb7eff-a529-9590-31e7-b0007b416f81
* Share code in various SkGPipeCanvas::drawBitmap_ calls.Gravatar scroggo@google.com2012-07-30
| | | | | | | | | | | | | | | | Also implement SkGPipeCanvas::drawBitmapMatrix, and create a GM to make sure it works properly. Use a flag instead of writing a bool for determining whether drawBitmap_ has a paint and whether drawBitmapRect has a source rectangle. BUG= TEST=drawbitmapmatrix GM Review URL: https://codereview.appspot.com/6450053 git-svn-id: http://skia.googlecode.com/svn/trunk@4828 2bbb7eff-a529-9590-31e7-b0007b416f81
* In SkGPipe, only serialize SkTypefaces in cross process mode.Gravatar scroggo@google.com2012-07-27
| | | | | | | | | | | | | | Also make SkGPipeController ref the recording canvas to ensure that objects used by SkGPipeCanvas (e.g. SharedHeap and fTypefaceSet, which hold references to objects to which pointers are written to the stream) survive to be played back even if SkGPipeWriter.endRecording() is called. BUG= TEST=TypefaceGM Review URL: https://codereview.appspot.com/6447055 git-svn-id: http://skia.googlecode.com/svn/trunk@4817 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkDeferredCanvas query SkGPipeWriter for space allocated for bitmaps.Gravatar scroggo@google.com2012-07-26
| | | | | | | | | | | SkGPipe now has a method to report how much memory is used for its shared heap. BUG=http://code.google.com/p/skia/issues/detail?id=738 TEST=DeferredCanvasTest Review URL: https://codereview.appspot.com/6445046 git-svn-id: http://skia.googlecode.com/svn/trunk@4791 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding virtual overload of isDrawingToLayer() to SkGPipeGravatar junov@chromium.org2012-07-18
| | | | | | | This change is to make The SkGPipe port of SkDeferredCanvas pass the CanvasTest unit test Review URL: https://codereview.appspot.com/6426046 git-svn-id: http://skia.googlecode.com/svn/trunk@4661 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactoring SkDeferredCanvas to use SkGPipe.Gravatar junov@chromium.org2012-07-18
| | | | | | | | | | Keeping the refactor hidden behind a config macro for now. TEST=covered by existing skia gm tests BUG=https://code.google.com/p/chromium/issues/detail?id=133432 Review URL: https://codereview.appspot.com/6405054 git-svn-id: http://skia.googlecode.com/svn/trunk@4656 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
* Purge bitmaps from SkGPipe's shared heap.Gravatar scroggo@google.com2012-07-17
| | | | | | | | | | | | | | | | | | | | | | | | BitmapInfo: Now in SkGPipePriv so it can be accessed by SkGPipeRead. Add the ability to essentially ref count BitmapInfos so that they can be purged to make room in the shared heap for a new one. SkGPipeWrite: Purge the least recently used bitmap if it has already been drawn by all readers. SkGPipeRead: Read the BitmapInfo (instead of the SkBitmap) and decrement its count after drawing. SkGPipeController: Added a method to tell how many readers will be used, so that when purging bitmaps each reader can be accounted for. Review URL: https://codereview.appspot.com/6374065 git-svn-id: http://skia.googlecode.com/svn/trunk@4638 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed Windows compiler complaintsGravatar robertphillips@google.com2012-07-10
| | | | | | | | http://codereview.appspot.com/6392044 git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
* In SkGPipe, set a limit on the amount of flattenables cached.Gravatar scroggo@google.com2012-07-09
| | | | | | | | Also fix a type in gmmain. Review URL: https://codereview.appspot.com/6351061 git-svn-id: http://skia.googlecode.com/svn/trunk@4473 2bbb7eff-a529-9590-31e7-b0007b416f81
* Another fix for drawing bitmaps through an SkGPipe that share pixelrefs.Gravatar scroggo@google.com2012-07-03
| | | | | | | | | | In addition to checking the offset, also check to ensure that the width and height match, so that a subset which includes the upper left corner will be handled properly as well. Review URL: https://codereview.appspot.com/6352066 git-svn-id: http://skia.googlecode.com/svn/trunk@4448 2bbb7eff-a529-9590-31e7-b0007b416f81
* Properly handle extracted bitmaps in cross process/shared addr space SkGPipe.Gravatar scroggo@google.com2012-07-02
| | | | | | | | | | | Use the pixel ref which we have already copied and the appropriate pixel ref offset. Turn SampleDrawBitmap into a GM to test this functionality. Review URL: https://codereview.appspot.com/6348059 git-svn-id: http://skia.googlecode.com/svn/trunk@4417 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a warning on linux when compiling SkGPipeWrite.cppGravatar scroggo@google.com2012-06-29
| | | | | | Review URL: https://codereview.appspot.com/6349057 git-svn-id: http://skia.googlecode.com/svn/trunk@4413 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix SkGPipe drawing, and turn it on by default.Gravatar scroggo@google.com2012-06-28
| | | | | | | | | | | | | | A recent change broke SkGPipe. Fix it, and turn on pipe drawing in GM by default so we will catch these in the future. We already had a bug where SkGPipeWriter had to use its Cross Process flag to work, so for a quick fix, force the reader to use the Cross Process flag as well. The bug to allow both cross and non cross process is http://code.google.com/p/skia/issues/detail?id=663 Review URL: https://codereview.appspot.com/6333071 git-svn-id: http://skia.googlecode.com/svn/trunk@4384 2bbb7eff-a529-9590-31e7-b0007b416f81
* For SkGPipe, store bitmaps in a common location.Gravatar scroggo@google.com2012-06-13
| | | | | | | | Also make a change to SkBitmap::copyTo() so that we do not crash. Review URL: https://codereview.appspot.com/6296066 git-svn-id: http://skia.googlecode.com/svn/trunk@4249 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename the existing flatten(void*) methods.Gravatar djsollen@google.com2012-06-08
| | | | | | | | This change avoids naminc confusion with the SkFlattenable flatten methods and also changes SkPath to use the void* model instead of taking a SkReader32. Review URL: https://codereview.appspot.com/6299062 git-svn-id: http://skia.googlecode.com/svn/trunk@4215 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make the GM tool run GMs through an SkGPipe.Gravatar scroggo@google.com2012-06-04
| | | | | | | | | | | | Add pipe to core gyp project. Do not run samplerstress through the pipe, since its custom MaskFilter will not draw correctly. Fix an assert in SkGPipeWrite when writing a typeface. Review URL: https://codereview.appspot.com/6276044 git-svn-id: http://skia.googlecode.com/svn/trunk@4139 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkStrokePathEffect into hiding for now, as its functionality is rethought.Gravatar reed@google.com2012-05-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3890 2bbb7eff-a529-9590-31e7-b0007b416f81
* Updates for SkGPipe.Gravatar scroggo@google.com2012-05-02
| | | | | | | | | | | | | | | Keep track of SkBitmaps which have been flattened by the PipeWriter so we can reuse them. Implement other flavors of drawBitmap (except drawBitmapMatrix). Flatten SkImageFilters in SkPaints. Do not notify if no new data has been written. Review URL: https://codereview.appspot.com/6128062 git-svn-id: http://skia.googlecode.com/svn/trunk@3826 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixes for drawing through an SkGPipe.Gravatar scroggo@google.com2012-04-20
| | | | | | | | | | | | | | | | | | | Implement SkGPipeCanvas::drawBitmap. Fix a bug where needOpBytes did not necessarily provide as many bytes as requested. Fix a bug where needOpBytes would wipe old data without calling notify. Register SkEmbossMaskFilter so it can be flattened. Override drawBitmapNine (currently unimplemented) so an SkGPipeCanvas does not call its base class' method (which would fail). Review URL: https://codereview.appspot.com/6071045 git-svn-id: http://skia.googlecode.com/svn/trunk@3741 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix bug where SkGPipe'ed clips do not happen.Gravatar scroggo@google.com2012-04-18
| | | | | | | | | | | | Modify SkGPipeCanvas::clipRect and ::clipPath so they correctly override the SkCanvas versions, and therefore get called. Also use SK_OVERRIDE for its virtual functions to help catch this in the future. BUG=572 Review URL: https://codereview.appspot.com/6055050 git-svn-id: http://skia.googlecode.com/svn/trunk@3718 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
* 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
* 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
* be sure to allocate space for kDone_DrawOp before we write it (thanks Yang)Gravatar reed@google.com2011-07-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1831 2bbb7eff-a529-9590-31e7-b0007b416f81