summaryrefslogtreecommitdiffstats
path: root/cc/test/tiled_layer_test_common.h
Commit message (Collapse)AuthorAgeFilesLines
* cc: Remove Layer::didUpdateBoundsenne@chromium.org2013-02-271-1/+0
| | | | | | | | | | | | | | | | | This function was only needed to get tests passing. Tests are updated to correctly call calculateDrawProperties where needed so that content bounds are up to date. The hud is now created in updateLayers (so that its content bounds can be updated) rather than in willCommit. R=danakj@chromium.org BUG=166023 Review URL: https://chromiumcodereview.appspot.com/11743033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185063 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Deblur layers that animate-scale-down on creation.danakj@chromium.org2013-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Layers that appear at a scale 1.5 with a transform animation that would take them to 1.0 end up drawing with the 1.5 tiling still when they complete their animation. This happens for two reasons: 1. It uses stale data in ManageTilings to tell if the layer is animating. 2. The active tree says it has ideal tilings when it has tilings >= ideal. We fix 1 by setting the animating draw properties flag before computing contents scales in calcDrawProperties. We fix 2 by not telling the scheduler that we drew with all ideal tilings if we did not. While fixing 2 we get rid of the tree walk in swapBuffers, by tracking if any incomplete tiles were used in the AppendQuadsData instead. BUG=173806 NOTRY=true Review URL: https://codereview.chromium.org/12188002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180851 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Avoid expensive RenderingStats collection.danakj@chromium.org2013-02-021-2/+2
| | | | | | | | | | | | | | | When --enable-gpu-benchmarking is not present, don't do expensive steps in the benchmark collection (meaning don't call base::TimeTicks::Now()). BUG=170735 NOTRY=true Depends on: https://bugs.webkit.org/show_bug.cgi?id=108358 Review URL: https://chromiumcodereview.appspot.com/12095053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180224 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Unify namespaces for all test filesenne@chromium.org2012-12-161-1/+2
| | | | | | | | | | | | | | All cc test harnesses now live in the cc namespace. Any cc unittest or pixeltest itself is in an anonymous namespace under cc. This patch removes all instances of the WebKitTest namespace from cc. R=jamesr@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/11474050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173391 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Refactor content scale/bounds into draw propertiesenne@chromium.org2012-12-161-5/+10
| | | | | | | | | | | | | | | | | This change allows layer impls to manipulate their content scale. This will allow PictureLayerImpl to pick some contents scale based on the scales of their tilings, rather than being stuck at the contents scale of its PictureLayer. This also de-virtualizes all of the content scale/bounds functions and instead allows a layer to manipulate its draw properties in response to a bounds or contents scale change. BUG=155209 Review URL: https://chromiumcodereview.appspot.com/11503005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173365 0039d316-1c4b-4281-b951-d872f2087c98
* [cc] Make LayerImpls point at LayerTreeImpl instead of LTHInduca@chromium.org2012-12-111-1/+1
| | | | | | | | | | BUG=155209 R=enne@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/11519018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172411 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Pass LayerTreeHostImpl to LayerImpl constructorenne@chromium.org2012-12-071-2/+2
| | | | | | | | | | | | | | | In order to allow for LayerImpl to notify its host when one of its property changes, it needs to more robustly have its host set (which is not the case in most tests). To avoid a recursive pass when adding children or after layer synchronization, instead just pass it to the constructor of LayerImpl, since a given LayerImpl will never move from one host to another. NOTRY=true BUG=none Review URL: https://chromiumcodereview.appspot.com/11472021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171830 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Create a Region class that wraps SkRegion, to replace use of ↵danakj@chromium.org2012-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-7/+7
| | | | | | | | | | | | | | | | | | 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 header include guards of our header files.tfarina@chromium.org2012-11-051-3/+3
| | | | | | | | | | | | | Fixed with a hacky python script :/ BUG=144576,144577 TEST=$ cpplint.py cc/*.h 2>&1 | grep header_guard. And verified it doesn't complain. R=enne@chromium.org,jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/11368063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165895 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Use gfx:: Geometry types for positions, bounds, and related things.danakj@chromium.org2012-11-011-12/+12
| | | | | | | | | | | | | | | | | | | | | | | 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-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* cc: Rename TextureUpdate to ResourceUpdate.reveman@google.com2012-10-251-2/+2
| | | | | | | | | | | | | | | | 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
* cc: Rename LayerUpdater::Texture to LayerUpdater::Resource.reveman@chromium.org2012-10-251-4/+4
| | | | | | | | | | 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: Remove CC*.h temporary includes, part 6/4.tfarina@chromium.org2012-10-241-1/+0
| | | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org TBR=jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/11228059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163749 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Rename LayerTextureUpdater to LayerUpdater.reveman@google.com2012-10-231-12/+12
| | | | | | | | | | | | | | | | | 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: Rename cc classes and members to match filenamesenne@chromium.org2012-10-221-25/+25
| | | | | | | | | | | 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-1/+0
| | | | | | | | | | | | | | | | | | | 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 3/4.tfarina@chromium.org2012-10-211-1/+1
| | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org TBR=jamesr@chromium.org Review URL: https://codereview.chromium.org/11228017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163205 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-25/+25
| | | | | | 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-25/+25
| | | | | | | | 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/+1
| | | | | | | | | | | | | | | | 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-1/+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/+1
| | | | | | | | | | | 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
* cc: Remove all but one texture uploader class.reveman@chromium.org2012-10-191-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the number of texture uploader classes from 4 to 1. - TextureUploader - ThrottledTextureUploader - UnthrottledTextureUploader - LayerTextureSubImage becomes - TextureUploader and it lives behind the CCResourceProvider interface where the LayerTextureSubImage instance used to be. This also makes the call stack when performing a texture upload less awkward. It used to look like this: CCTextureUpdateController::updateMoreTexturesNow() -> ThrottledTextureUploader::updateTexture() -> CCPrioritizedTexture::upload() -> CCResourceProvider::upload() -> LayerTextureSubImage::upload() -> glTexSubImage2D() but now looks like this: CCTextureUpdateController::updateMoreTexturesNow() -> CCPrioritizedTexture::upload() -> CCResourceProvider::upload() -> TextureUploader::upload() -> glTexSubImage2D() which makes a lot more sense considering that CCTextureUpdateController::updateMoreTexturesNow() should really be called CCResourceUpdateController::updateMoreResourcesNow() and CCPrioritizedTexture::upload() should be CCPrioritizedResource::update(). This is only refactoring and should not change the behavior of the compositor in any way. BUG= TEST=cc_unittests Review URL: https://chromiumcodereview.appspot.com/11188055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162951 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GraphicsContext3D:: stubs from ccjamesr@chromium.org2012-10-181-1/+1
| | | | | | | | | | | | 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: Replace TextureUploader::Parameters with ResourceUpdate struct.reveman@google.com2012-10-181-1/+7
| | | | | | | | | | | | | | This is in preparation to reducing texture uploader classes and simplifying the resource update system. Also moves accelerated painting code to texture update controller. This doesn't change the behavior of the compositor in any way. BUG= TEST=cc_unittests Review URL: https://codereview.chromium.org/11183027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162603 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 162284 - cc: Get rid of CC*.h temporary header files.mattm@chromium.org2012-10-171-3/+3
| | | | | | | | | | | | 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-3/+3
| | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | 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-3/+5
| | | | | | | | | 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: Remove LayerTextureUpdater::Texture::updateRect() callback.reveman@chromium.org2012-10-131-10/+3
| | | | | | | | | | | | | | | | 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] Change cc_tests.gyp filenames to Chromium styleenne@chromium.org2012-10-121-0/+138
| | | | | | | | BUG=155413 Review URL: https://codereview.chromium.org/11108020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161642 0039d316-1c4b-4281-b951-d872f2087c98
* [cc] Land preliminary empty headers for libcc renamesenne@chromium.org2012-10-121-0/+3
Landing empty headers first will prevent gyp conflicts later. BUG=155413 Review URL: https://chromiumcodereview.appspot.com/11116002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161526 0039d316-1c4b-4281-b951-d872f2087c98