summaryrefslogtreecommitdiffstats
path: root/cc/resources/picture_pile_impl_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* setConfig is deprecated, use setInfo or allocPixels insteadreed@google.com2014-06-301-4/+1
| | | | | | | | | | kPMColor_SkColorType -> kN32_SkColorType BUG=skia:2706 Review URL: https://codereview.chromium.org/333583006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280689 0039d316-1c4b-4281-b951-d872f2087c98
* CC: Test for completely filled contents.epenner@chromium.org2014-04-051-2/+13
| | | | | | | | | | | | Follow up to: https://codereview.chromium.org/222823004/ BUG=357117 TBR=enne@chromium.org Review URL: https://codereview.chromium.org/224883003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261968 0039d316-1c4b-4281-b951-d872f2087c98
* SkColorType instead of (deprecated) SkBitmap::Configreed@google.com2014-03-251-8/+2
| | | | | | | | | | | Part of this refactoring was the recognition of a common pattern: - setConfig + alloc + setImmutable + pass_to_UIResourceBitmap This CL introduces a direct way on UIResourceBitmap to create such a bitmap, by just specifying its dimensions. This encapsulates internal requirements (e.g. colortype and immutability). Review URL: https://codereview.chromium.org/197883017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259349 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Don't consider borders when iterating pixel refsenne@chromium.org2014-03-211-0/+78
| | | | | | | | | | | | | | | | | This patch cleans up a TODO from https://codereview.chromium.org/202753002/. Previously, when iterating through picture map tiles looking for pixel refs, the PixelRefIterator intersected every tile including its borders. This unnecessarily would include more pixel refs than necessary when a content rect intersected with a picture map tile boundary. This patch cleans up that edge case to not include those extra tiles. BUG=none Review URL: https://codereview.chromium.org/199483004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258478 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Prevent overlapping picture playbackenne@chromium.org2014-03-191-0/+65
| | | | | | | | BUG=345736 Review URL: https://codereview.chromium.org/189403007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258110 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Gather and lock/unlock SkDiscardablePixelRefs instead of ↵reveman@chromium.org2014-01-081-91/+90
| | | | | | | | | | | | | | | | | skia::LazyPixelRefs. This removes the use of skia::LazyPixelRef from the compositor, which allows us to gather and lock/unlock SkDiscardablePixelRefs in the instead. skia::LazyPixelRef will be removed completely when no longer in use by blink. BUG=329094 Review URL: https://codereview.chromium.org/111143005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243660 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Allow PicturePile tests to unset debug canvas clearingenne@chromium.org2013-11-011-2/+2
| | | | | | | | | | | | | | This is a followup to https://codereview.chromium.org/51433003/. Without this, it's hard to write tests that verify raster behavior because the debug canvas clearing sets all the bitmap pixels to some arbitrary debug color before doing any rastering. R=brianderson@chromium.org BUG=none Review URL: https://codereview.chromium.org/47603018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232507 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Fix PicturePile clearing for non-origin canvasesenne@chromium.org2013-11-011-26/+53
| | | | | | | | | | | | | | | When canvases are larger than content, and content is stretched and terminates on a non-integer pixel boundary, then the area underneath that content must be cleared first. The clearing code attempted to clear a 2 pixel wide strip, but was not translating it, so it only worked for canvases located at the origin. R=brianderson@chromium.org BUG=296672 Review URL: https://codereview.chromium.org/51433003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232349 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Changing picture pile in favour of a grid of pictures.vmpstr@chromium.org2013-10-291-79/+0
| | | | | | | | | | | | This patch changes the representation of a picture pile to be that of a grid of picture refs. Current version creates a new picture for each invalidated "chunk", but that will probably need to change. BUG=294404 Review URL: https://codereview.chromium.org/23698016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231522 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Removed unused metrics from RenderingStats.ernstm@chromium.org2013-10-091-6/+6
| | | | | | | | | | | | | | | - Removed everything except for frame count, paint/record/rasterize time and pixel count. - Cleaned up variable naming. - Removed RasterStats struct. Replaced by direct usage of RenderingStatsInstrumentation. R=nduca@chromium.org BUG=234308,280638 Review URL: https://codereview.chromium.org/26031002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227666 0039d316-1c4b-4281-b951-d872f2087c98
* Make Android WebView filtering depend on scrolling status.aelias@chromium.org2013-10-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | This patch makes bilinear filtering of software images enabled only when there is no scrolling or CSS animation active, which matches the policy of classic WebView. In the long run, we'll likely want to support software tiling to avoid this kind of hack, but for now this maintains bugwards compatibility. Most of this patch is to solve the problem that CC was not aware whether or not WebView-handled fling is active. I added a new getter ScrollOffsetDelegate::IsExternalFlingActive for this. This also enables prefer-smoothness mode for these flings. New test RendererPixelTest.PictureDrawQuadDisableImageFiltering NOTRY=true BUG= internal b/10706494 Review URL: https://codereview.chromium.org/25233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227629 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add best_record_time to rendering stats.ernstm@chromium.org2013-10-011-2/+1
| | | | | | | | | | | | | - Symmetric to best_rasterize_time. - In preparation for moving rasterize_and_record benchmark to tracing based architecture. R=nduca@chromium.org BUG=280638 Review URL: https://codereview.chromium.org/25284005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226345 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Switch Picture to use RenderingStatsInstrumentationegraether@chromium.org2013-06-271-2/+4
| | | | | | | | | | depends on: https://codereview.chromium.org/13266002/ BUG=181319 Review URL: https://chromiumcodereview.appspot.com/13132005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208976 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Clear impl-side painting canvases more efficientlyenne@chromium.org2013-06-071-0/+82
| | | | | | | | | | | | | | | | | | | | This change pipes the contents opaque flag from the layer to the pile recording. If this flag is true, the layer promises that it will raster something opaque covering layer bounds. This lets us avoid a clear for all but the internal edge texels which need to be cleared for filtering during rasterization and the external edge texels which need to be cleared for filtering during drawing. Any non-opaque layer now just gets cleared to transparent, as that seemed to be about 4x faster on average than drawing a rect even for rects that didn't cover the entire canvas. R=vmpstr@chromium.org BUG=246782 Review URL: https://chromiumcodereview.appspot.com/16580011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204779 0039d316-1c4b-4281-b951-d872f2087c98
* Update cc/ to use scoped_refptr<T>::get() rather than implicit "operator T*"rsleevi@chromium.org2013-06-011-159/+53
| | | | | | | | | | | Linux fixes BUG=110610 TBR=enne Review URL: https://chromiumcodereview.appspot.com/15984004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203584 0039d316-1c4b-4281-b951-d872f2087c98
* Add flag for drawing layers to screen with Ganeshenne@chromium.org2013-05-211-0/+15
| | | | | | | | | | | | | | | | The --force-direct-layer-drawing flag causes any layer that could be drawn direct to the backbuffer to be drawn to the backbuffer using Ganesh. This flag also requires both the --enable-threaded-compositing flag and the --enable-impl-side-painting flag to have any effect. This patch also turns on testing for PictureDrawQuad using Ganesh in the cc pixeltests. BUG=none Review URL: https://chromiumcodereview.appspot.com/13863015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201362 0039d316-1c4b-4281-b951-d872f2087c98
* Only use skia::RefPtr for refcountingenne@chromium.org2013-05-181-55/+2
| | | | | | | | | | | | | | | | | | | | | For consistency and sanity in Chromium, only use skia::RefPtr in Chromium to ref count skia classes. SkRefPtr is unsafe to use for newly created objects because it refs the object that is passed to its constructor. skia::RefPtr makes this adoption explicit it via skia::AdoptRef and so is much clearer. This patch also adds a skia::ShareRef function which makes it explicit that the callsite is adopting a ref which is already owned somewhere else. Using AdoptRef vs. ShareRef seems much clearer than using SkRefPtr vs. skia::RefPtr. These are the remaining code sites that use internal Skia reference counted classes. Once these have been removed, then we can use a PRESUBMIT rule to prevent new uses from being added. BUG=none Review URL: https://chromiumcodereview.appspot.com/15004024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200989 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove TileManager::GatherPixelRefsForTile.reveman@chromium.org2013-05-031-2/+3
| | | | | | | | | | | | | This function is no longer needed as it's now cheap to iterate over a tile's pixel refs. This also moves the recording of pixel ref gathering related stats to the Picture class and the main thread where the real cost is paid. BUG=237593 Review URL: https://chromiumcodereview.appspot.com/14712006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198068 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add pixel tests for PictureDrawQuadenne@chromium.org2013-04-301-18/+9
| | | | | | | | | | | | | | | Add tests for simple pictures, clipped pictures, transformed pictures, scaled content rects, content subrects, and content scales. As the software renderer doesn't support picture draw quad yet, this is only turned on for the gl renderer. R=danakj@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/14001009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197230 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Do GatherPixelRefs from skia at record timevmpstr@chromium.org2013-04-251-0/+729
| | | | | | | | | | | | | This change gather lazy pixel refs from skia at record time and stores them in a 512x512 grid. When GatherPixelRefs is invoked, the refs are looked up in this grid (cells that intersect our required rect contribute their pixel refs to the final result) BUG=231977 Review URL: https://chromiumcodereview.appspot.com/14230007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196451 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Only consider layer clipped content rect for analysisvmpstr@chromium.org2013-04-191-0/+139
This fixes a problem in which tiles that are on the right and bottom edges of the viewport are not considered solid, even when the visible part of them is solid. BUG=230875 Review URL: https://chromiumcodereview.appspot.com/14205005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195103 0039d316-1c4b-4281-b951-d872f2087c98