aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pipe
Commit message (Collapse)AuthorAge
* Split SkDevice into SkBaseDevice and SkBitmapDeviceGravatar robertphillips@google.com2013-08-29
| | | | | | | | https://codereview.chromium.org/22978012/ git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get ↵Gravatar robertphillips@google.com2013-08-20
| | | | | | Chromium ready. git-svn-id: http://skia.googlecode.com/svn/trunk@10835 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split SkDevice out of SkBitmapDeviceGravatar robertphillips@google.com2013-08-20
| | | | | | | | https://codereview.chromium.org/22978012/ git-svn-id: http://skia.googlecode.com/svn/trunk@10830 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix name of "bleed" flagGravatar robertphillips@google.com2013-08-20
| | | | | | | | https://codereview.chromium.org/22812014/ git-svn-id: http://skia.googlecode.com/svn/trunk@10805 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-08-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10790 2bbb7eff-a529-9590-31e7-b0007b416f81
* This CL plumbs in the drawBitmapRectToRect "bleed" flag and makes it live on ↵Gravatar commit-bot@chromium.org2013-08-16
| | | | | | | | | | | | the simplest GPU path. R=bsalomon@google.com, reed@google.com, edisonn@google.com, scroggo@google.com, jvanverth@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/20806003 git-svn-id: http://skia.googlecode.com/svn/trunk@10765 2bbb7eff-a529-9590-31e7-b0007b416f81
* First pass at Comment APIGravatar robertphillips@google.com2013-05-29
| | | | | | | | https://codereview.chromium.org/13957009/ git-svn-id: http://skia.googlecode.com/svn/trunk@9310 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixes for piping bitmaps with encoded data.Gravatar scroggo@google.com2013-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar goals as https://codereview.chromium.org/14437012. Builds on patch set 1 from that issue (https://codereview.chromium.org/14437012/#ps1). Instead of the changes in patch set 2 from that issue, this changes SkOrderedWriteBuffer::writeBitmap to store whether an SkBitmapHeap was used when to store the index of the SkBitmap. SkOrderedReadBuffer::readBitmap now uses that information to distinguish between using the heap and unflattening. In addition, writeBitmap now records the width/height first in all cases. If now SkBitmapHeapReader is attached, but an SkBitmapHeap was used to record the bitmap, reading will fail and provide the same red SkBitmap as in the case where the SkBitmap was encoded but could not be decoded. Updates the PICTURE_VERSION as well. The key differences in this CL to look at are in: SkOrderedWriteBuffer, SkOrderedReadBuffer, and SkPicture. BUG= R=djsollen@google.com Review URL: https://codereview.chromium.org/14230022 git-svn-id: http://skia.googlecode.com/svn/trunk@8917 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* Fix a bunch of warnings, mainly around rowBytes.Gravatar scroggo@google.com2013-02-25
| | | | | | | | | | | My recent change changed the way SkBitmap::fRowBytes is stored, and parameter/return values referring to rowBytes were changed to type size_t. Change the storage back, and eliminate warnings resulting from returning a size_t. Review URL: https://codereview.appspot.com/7396059 git-svn-id: http://skia.googlecode.com/svn/trunk@7855 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warning from scalar --> int32 conversionGravatar humper@google.com2013-01-07
| | | | | | | | BUG= Review URL: https://codereview.appspot.com/7065050 git-svn-id: http://skia.googlecode.com/svn/trunk@7061 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
* Adding a silent playback option to SkGPipeReadGravatar junov@chromium.org2012-09-20
| | | | | | | | | | | Testing state consistency after silent playback in CanvasTest indirectly through SkDeferredCanvas. BUG=http://code.google.com/p/chromium/issues/detail?id=146178 TEST=CanvasTest unit test, and bench with --mode deferredSilent Review URL: https://codereview.appspot.com/6542047 git-svn-id: http://skia.googlecode.com/svn/trunk@5619 2bbb7eff-a529-9590-31e7-b0007b416f81
* In bench_pictures, use a pool of tiles for multicore drawing.Gravatar scroggo@google.com2012-09-20
| | | | | | | | | | | | | | | | | | | Also includes some code cleanup and code sharing. Allow setting the number of threads on the command line. Rename ThreadSafePipeController::playback to ::draw, to be the same as SkPicture so DrawTileToCanvas can take a template parameter. Disallow multithreading with GPU turned on. Display help information with improper tiled arguments. BUG=https://code.google.com/p/skia/issues/detail?id=871 Review URL: https://codereview.appspot.com/6536050 git-svn-id: http://skia.googlecode.com/svn/trunk@5602 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
* Rename my DeferredPipeController to not conflict with the other.Gravatar scroggo@google.com2012-08-31
| | | | | | | | Fixes build. Review URL: https://codereview.appspot.com/6506055 git-svn-id: http://skia.googlecode.com/svn/trunk@5372 2bbb7eff-a529-9590-31e7-b0007b416f81
* Perform multi core rendering in bench_pictures.Gravatar scroggo@google.com2012-08-31
| | | | | | | | | | | | | Add a flag in SkGPipeWriter for threadsafe drawing. Add a deferred pipe controller to SamplePipeControllers, which can be called to play back in multiple threads. Depends on http://codereview.appspot.com/6459105/ Review URL: https://codereview.appspot.com/6482068 git-svn-id: http://skia.googlecode.com/svn/trunk@5371 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
* Clean up most clang warnings outside animator/Gravatar tomhudson@google.com2012-08-14
| | | | | | | | http://codereview.appspot.com/6464058/ git-svn-id: http://skia.googlecode.com/svn/trunk@5079 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
* Update SkFlattenable buffers to be more modular.Gravatar djsollen@google.com2012-08-07
| | | | | | | | | | | | | | | | | 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/6448095 git-svn-id: http://skia.googlecode.com/svn/trunk@4980 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