summaryrefslogtreecommitdiffstats
path: root/cc/tiled_layer.cc
Commit message (Collapse)AuthorAgeFilesLines
* Animation code is not yet migrated by this patch, due to WebTransformOperations.shawnsingh@chromium.org2012-11-271-2/+1
| | | | | | | | BUG=159972 Review URL: https://codereview.chromium.org/11308153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169609 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Increase 'small animated layer' size.epenner@chromium.org2012-11-201-11/+12
| | | | | | | | | | | On Nexus 10 upstream in content shell, some transition layers are 80 pixels larger than the viewport. Use one tile padding instead, as the layer is padded to that size anyway. BUG=159937 Review URL: https://chromiumcodereview.appspot.com/11316034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168907 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Add methods to Rect classes to get points at each of the rect's corners.danakj@chromium.org2012-11-201-1/+0
| | | | | | | | | | | | | | | | | | | | This adds the following methods: RectBase::TopRight() RectBase::BottomLeft() RectBase::BottomRight() RectBase::origin() still provides the rect's top-left corner. Tests: ui_unittests:RectTest.Cornders BUG=147395 R=sky Review URL: https://chromiumcodereview.appspot.com/11358240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168859 0039d316-1c4b-4281-b951-d872f2087c98
* Always use border texels on layer tiles. We already did that on certain ↵alokp@chromium.org2012-11-151-14/+0
| | | | | | | | | | | platforms. This patch extends it to all platforms. BUG=160072 Review URL: https://chromiumcodereview.appspot.com/11360205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167870 0039d316-1c4b-4281-b951-d872f2087c98
* Remove WTF and WebCore from cc/ and webkit/compositor_bindings/piman@chromium.org2012-11-101-19/+10
| | | | | | | | | | | Ding, dong... BUG=154451 Review URL: https://chromiumcodereview.appspot.com/11410021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167071 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Add methods to clamp Sizes, Points, and Vectors from above or below.danakj@chromium.org2012-11-101-2/+2
| | | | | | | | | | | | | | | | | | Tests: PointTest.Clamp PointTest.ClampF SizeTest.Clamp SizeTest.ClampF Vector2dTest.Clamp Vector2dTest.ClampF Vector3dTest.ClampF R=sky,enne BUG=147395 Review URL: https://codereview.chromium.org/11361186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167014 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Create a Region class that wraps SkRegion, to replace use of ↵danakj@chromium.org2012-11-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | WebCore::Region. We create a class in cc/ called Region which provides a gfx:: type-friendly API to SkRegion, and allows for easily swapping out region implementations in the future if required. During the process, I removed tests dependency on a "size()" method on Region, that used to give the number of rects in the Region's internal representation. Instead, we always create a Region in the tests from our expected rects, and compare the Regions directly. We use ToString() comparisons to get useful failure outputs, similar to the unit tests of other geometry types in ui/gfx. This uncovered a WTF::Vector holdout in the OcclusionTracker class, which is converted to a std::vector. Covered by existing tests; no change in behaviour. R=enne BUG=147395 Review URL: https://chromiumcodereview.appspot.com/11366094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166617 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Rename PrioritizedTexture to PrioritizedResource.reveman@google.com2012-11-071-16/+16
| | | | | | | | | | | | | | | | | | sed -e ' s/PrioritizedTexture/PrioritizedResource/g s/prioritized_texture/prioritized_resource/g s/PRIORITIZED_TEXTURE/PRIORITIZED_RESOURCE/g s/managedTexture/managedResource/g s/textureManager/resourceManager/g s/constentsTextureManager/constentsResourceManager/g ' BUG= TEST=cc_unittests Review URL: https://codereview.chromium.org/11369109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166520 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Fix style for comments at the end of namespacesdanakj@chromium.org2012-11-051-1/+1
| | | | | | | | | | | | Make sure we have a comment at the end of the namespace for each .cc file and that there are two spaces between the closing brace and the comment. R=enne Review URL: https://chromiumcodereview.appspot.com/11275153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166005 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove WebCore rect use from the compositor, except within Region.danakj@chromium.org2012-11-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | This replaces the last cases of FloatRect with gfx::RectF. It depends on the IsExpressibleAsRect() method in https://codereview.chromium.org/11364054/ and removes the stubs as well! We add an API to the Region class that is intended to be our final Region class interface. It uses an iterator to walk the rects in the Region, which is compatible with the SkRegion API, but can also hide the IntRects exposed by the WebCore Region API. Once this is done, there is no need to use cc::IntRect, and we can remove it entirely. Covered by existing tests; no change in behaviour. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11360066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165837 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most remaining references to IntRect and FloatRect.danakj@chromium.org2012-11-011-6/+6
| | | | | | | | | | | | | | | | The remaining uses are: - Dealing with the output of Region::rects() which gives a vector of WebCore::IntRects. - Using FloatRect::isExpressibleAsIntRect. Covered by existing tests; no new behaviour. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11275113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165542 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Use gfx:: Geometry types for positions, bounds, and related things.danakj@chromium.org2012-11-011-104/+105
| | | | | | | | | | | | | | | | | | | | | | | This covers layers, layer tree hosts, and related classes. *phew* I intentionally avoided anything to do with scrolling or page scale. Those should be changed to be Vectors and need a bit more thought. This change should be pretty mindless. It converts to gfx Rect, Size, Vector, and Point classes. No change is made for FloatPoint3D or FloatQuad yet. I've added cc/geometry.h as a place for free functions that don't exist on gfx types yet, and that we should port over in the future. No change in behaviour; covered by existing tests. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11264056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165434 0039d316-1c4b-4281-b951-d872f2087c98
* Pass accurate contentsScale to LayerImpl.wangxianzhu@chromium.org2012-11-011-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part of fixing fuzzy content issue in composited layers in scaled pages. There are two reasons of fuzzy content: 1) Inaccurate scale: The scale in transformation is calculated with contentBounds.width / bounds.width contentBounds.height / bounds.height in layer_tree_host_common.cc and other places. However, contentBounds is a IntSize which is calculated from bounds and contentsScale in layer.cc: IntRect(lroundf(bounds.width * contentsScale), lroundf(bounds.height * contentsScale)) This causes the scale like 0.993 or 1.007 in the drawTransformation etc. where identity transformation is expected. To resolve the issue, instead of calculating scale using contentBounds, pass the accurate contentsScale from Layer to LayerImpl. 2) Pixel on surfaces are not aligned. Will describe this in the CL for the second part. (See https://bugs.webkit.org/show_bug.cgi?id=84187 for more details). Change-Id: I8f59f0460e1b212223e2c8c551b4127d8239e5cc BUG=bugs.webkit.org/show_bug.cgi?id=84187 TEST=ContentsScalingLayerTest.checkContentBounds, LayerTreeHostCommonTest.verifyLayerTransformsInHighDPIAccurateScaleZeroPosition, LayerTreeHostCommonTest.verifyRenderSurfaceTransformsInHighDPIAccurateScaleZeroPosition Review URL: https://chromiumcodereview.appspot.com/11276060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165269 0039d316-1c4b-4281-b951-d872f2087c98
* Use gfx:: Geometry types for the resource provider and layer updater classes.danakj@chromium.org2012-10-311-6/+6
| | | | | | | | | | | | | This depends on the gfx::Vector2d class from https://codereview.chromium.org/11269022/ Covered by existing tests, just changing data types. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11266030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165225 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clipping/culling for DelegatedRendererLayer*piman@chromium.org2012-10-301-1/+1
| | | | | | | | | | | | | | OcclusionTracker::unoccludedContentRect was assuming that transform and clip for the quads matched the one from the layer, which is not true for delegated quads. Instead, explicitly pass transform & clip, and keep the old behavior as unoccludedLayerContentRect for tests. BUG=None Review URL: https://chromiumcodereview.appspot.com/11189133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165017 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Convert more usages from Vector to std::vector.tfarina@chromium.org2012-10-291-3/+3
| | | | | | | | | | | | | This patch converted the entries found by the following command line: $ g grep -n "Vector<" cc/ | grep -v ScopedPtrVector | grep -v WebVector | grep -v "Vector<WebCore::IntRect" BUG=154451 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org Review URL: https://codereview.chromium.org/11343003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164582 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Rename TextureUpdate to ResourceUpdate.reveman@google.com2012-10-251-3/+3
| | | | | | | | | | | | | | | | sed -e ' s/TextureUpdateQueue/ResourceUpdateQueue/g s/texture_update_queue/resource_update_queue/g s/TextureUpdateController/ResourceUpdateController/g s/texture_update_controller/resource_update_controller/g ' BUG= TEST=cc_unittests Review URL: https://codereview.chromium.org/11270047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164177 0039d316-1c4b-4281-b951-d872f2087c98
* One good thing (the only good thing?) about the recent textureepenner@chromium.org2012-10-251-69/+20
| | | | | | | | | | | | | | | | | | | | | | | | | manager bug, is that it clarified where in-use-on-impl textures need to be protected (in the texture manager - the lack of which was the bug). The deleteTextureAfterCommit mechanism protects the 'front-buffer' when double-buffering updates, but it was never quite functional since it doesn't protect 'front-buffer' textures for layers which are deleted entirely while they still exist in the impl-tree. Since the texture manager takes care of this, we can remove this redundant protection code and just discard the texture backing when a buffered update is required. Once textures live primarily on the impl-thread and can be removed from the impl-tree, the notion of 'in-use' can become much more accurate, and the number of textures which are not safe to be evicted or recycled will be greatly reduced. Review URL: https://chromiumcodereview.appspot.com/11028132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164131 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Rename LayerUpdater::Texture to LayerUpdater::Resource.reveman@chromium.org2012-10-251-10/+10
| | | | | | | | | | BUG= TEST=cc_unittests Review URL: https://chromiumcodereview.appspot.com/11236078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164007 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add predictive pre-painting.epenner@chromium.org2012-10-231-25/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | When scrolling quickly and with painting just barely able to keep up, it's possible get into a bad state where we always do visible painting and never get a chance to paint ahead of the fold. This shows up as flickering at the bottom of the page. This patch has two parts. First, it uses a scroll prediction when choosing what to paint (both for 'visible' and off-screen painting). Second, it adds a very simple scroll predictor based on the change in the visibleContentRect. The second part should almost certainly be improved (use impl-thread scroll/animation directions/velocities) but this provides an initial estimate that helps in the most important case (basic scrolling of big layers). This doesn't actually change the priorities of textures in the scroll direction (but changing the visible rect does this partially). This is not an issue currently since the what-to-paint logic doesn't strictly adhere to priority order. BUG=121957 Review URL: https://chromiumcodereview.appspot.com/11193010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163665 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Rename LayerTextureUpdater to LayerUpdater.reveman@google.com2012-10-231-10/+10
| | | | | | | | | | | | | | | | | sed -e ' s/TextureUpdater/Updater/g s/textureUpdater/updater/g s/texture_updater\.h/updater.h/g s/texture_updater\.cc/updater.cc/g s/TEXTURE_UPDATER_H_/UPDATER_H_/g ' BUG= TEST=cc_unittests Review URL: https://codereview.chromium.org/11231082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163615 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove CC*.h temporary includes, part 5/4.tfarina@chromium.org2012-10-231-2/+2
| | | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org TBR=jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/11225040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163479 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Rename cc classes and members to match filenamesenne@chromium.org2012-10-221-61/+61
| | | | | | | | | | | Fixed reland of https://chromiumcodereview.appspot.com/11189043/ TBR=jam@chromium.org,jamesr@chromium.org BUG=155413 Review URL: https://codereview.chromium.org/11231054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163429 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Move contentsSwizzled property from LayerTextureUpdater to ↵reveman@google.com2012-10-221-3/+1
| | | | | | | | | | | | | | | | | | | CCPrioritizedTexture class. The contentsSwizzled property is true when we upload BGRA contents to a RGBA texture. Instead of having the LayerTextureUpdater (which is not responsible for texture uploads) determine the value of this property set it in CCPrioritizedTexture::upload() when an upload takes place. This will also allow us to remove the FrameBufferSkPictureCanvasLayerTextureUpdater class, which currently only exists so contentsSwizzled is set correctly. BUG= TEST=manual Review URL: https://codereview.chromium.org/11232028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163347 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove CC*.h temporary includes, part 4/4.tfarina@chromium.org2012-10-221-1/+1
| | | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org TBR=jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/11233025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163225 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove CC*.h temporary includes, part 2/4.tfarina@chromium.org2012-10-201-1/+1
| | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org TBR=jamesr@chromium.org Review URL: https://codereview.chromium.org/11225022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163196 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "cc: Rename cc classes and members to match filenames"enne@chromium.org2012-10-191-61/+61
| | | | | | This reverts commit 184fac5add06d5f4670fa6be4a4d3b39232d51bb. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163059 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Rename cc classes and members to match filenamesenne@chromium.org2012-10-191-61/+61
| | | | | | | | BUG=155413 Review URL: https://codereview.chromium.org/11189043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163052 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "cc: Remove CC*.h temporary includes, part 1/4."tfarina@chromium.org2012-10-191-1/+0
| | | | | | | | | | | | | | | | Exception: Missing input files: c:\b\build\slave\cr-win-rel\build\src\cc\CCTextureUpdateQueue.h Relanding with this file removed as well. BUG=155413 TEST=cc_unittests TBR=enne@chromium.org Review URL: https://chromiumcodereview.appspot.com/11227005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163028 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r162986 "cc: Remove CC*.h temporary includes, part 1/4."pfeldman@chromium.org2012-10-191-0/+1
| | | | | | | Build fails with "gclient hooks failed" error. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162988 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove CC*.h temporary includes, part 1/4.tfarina@chromium.org2012-10-191-1/+0
| | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org Review URL: https://chromiumcodereview.appspot.com/11189076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162986 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GraphicsContext3D:: stubs from ccjamesr@chromium.org2012-10-181-1/+2
| | | | | | | | | | | | cc needs GL enum values. In WebKit, these came from GraphicsContext3D::, Extensions3D::, Extensions3DChromium and types came from GraphicsTypes3D. In chromium, we juse use the GL headers for this. BUG=144577 Review URL: https://chromiumcodereview.appspot.com/11111005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162839 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Switch to Chromium DCHECKs LOGsdanakj@chromium.org2012-10-181-9/+9
| | | | | | | | | | | | | | | We can't compile-guard code and use DCHECK since it can be enabled at runtime. So we guard the DCHECKs that we want to rely on conditionally-compiled code in !NDEBUG compile guards. This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo"; This was previously discussed and committed as https://codereview.chromium.org/11048044/ using a guard based on LOGGING_IS_OFFICIAL_BUILD, however this was not sufficient since there are build configurations that are official builds but have dchecks compiled. R=enne Review URL: https://codereview.chromium.org/11192030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162739 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "cc: Switch to Chromium DCHECKs LOGs"mattm@chromium.org2012-10-171-9/+9
| | | | | | | | | | This reverts commit 162296. (https://chromiumcodereview.appspot.com/11048044) TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/11196014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162297 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Switch to Chromium DCHECKs LOGsdanakj@chromium.org2012-10-171-9/+9
| | | | | | | | | | | | | | We can't compile-guard code and use DCHECK since it can be enabled at runtime. This removes all compile-time guards, and makes use of DCHECK instead of ASSERT. We use DCHECK_IS_ON() to early out and avoid extra work just for DCHECK where possible as well. This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo"; R=enne,jamesr Review URL: https://chromiumcodereview.appspot.com/11048044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162296 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 162284 - cc: Get rid of CC*.h temporary header files.mattm@chromium.org2012-10-171-2/+2
| | | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org Review URL: https://codereview.chromium.org/11145033 TBR=tfarina@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162286 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Get rid of CC*.h temporary header files.tfarina@chromium.org2012-10-161-2/+2
| | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org Review URL: https://codereview.chromium.org/11145033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162284 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove the temporary header files that aren't prefixed with CC*tfarina@chromium.org2012-10-161-2/+2
| | | | | | | | | | | | | The list of files was generated with the following command line: $ ls *.h cc/ | grep -v CC BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org Review URL: https://codereview.chromium.org/11189011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162247 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove wtf includes from *LayerTextureUpdater headersenne@chromium.org2012-10-161-6/+7
| | | | | | | | | BUG=154451 Review URL: https://chromiumcodereview.appspot.com/11143027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162152 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Store tiles, painters, tiling data in scoped_ptrenne@chromium.org2012-10-151-34/+9
| | | | | | | | | BUG=154451 Review URL: https://chromiumcodereview.appspot.com/11144023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161994 0039d316-1c4b-4281-b951-d872f2087c98
* Remove USE(ACCELERATED_COMPOSITING) references from ccjamesr@chromium.org2012-10-151-4/+1
| | | | | | | | | | This isn't needed. BUG= Review URL: https://codereview.chromium.org/10957055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161885 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove LayerTextureUpdater::Texture::updateRect() callback.reveman@chromium.org2012-10-131-9/+4
| | | | | | | | | | | | | | | | This is the first step towards cleaning up and simplifying the resource update system. Eliminates the LayerTextureUpdater::Texture::updateRect() callback by moving some logic to CCResourceProvider. Remaining logic is now contained in LayerTextureUpdater::Texture::update(). The logic itself is not changed, this is only re-factoring. BUG=154472 TEST=manual Review URL: https://chromiumcodereview.appspot.com/11074009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161752 0039d316-1c4b-4281-b951-d872f2087c98
* [cc] Rename all cc/ filenames to Chromium styleenne@chromium.org2012-10-121-0/+820
BUG=155413 Review URL: https://codereview.chromium.org/11122003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161671 0039d316-1c4b-4281-b951-d872f2087c98