summaryrefslogtreecommitdiffstats
path: root/cc/quad_culler.cc
Commit message (Collapse)AuthorAgeFilesLines
* cc: Make the ScopedPtrVector and ScopedPtrDeque containers act like STL ↵danakj@chromium.org2013-01-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | vector and deque. These classes used methods to match the webcore classes and ease migration. Now they are at odds with the STL versions of these containers. Rename the methods, and change arguments from indexes to iterators, to match the STL containers. isEmpty() => empty() last() => back() first() => front() Peek() => at() append() => push_back() insert(index, value) => insert(iterator, value) remove(index) => erase(iterator) and erase(iterator, iterator) take(index) => take(iterator) takeFront() => take_front() takeBack() => take_back() Review URL: https://chromiumcodereview.appspot.com/11418108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175722 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove all uses of "using namespace std".tfarina@chromium.org2013-01-031-2/+0
| | | | | | | | | | BUG=82078,144576,144577 R=danakj@chromium.org Review URL: https://chromiumcodereview.appspot.com/11753004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174966 0039d316-1c4b-4281-b951-d872f2087c98
* [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImplnduca@chromium.org2012-12-121-1/+1
| | | | | | | | | | | | | Pulled settings & debugstate to their own files to reduce header coupling, which bit me a few times on this patch [lthi needs lth, lti needs lthi for settings, etc]. NOTRY=true BUG=155209 R=enne Review URL: https://chromiumcodereview.appspot.com/11529003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172635 0039d316-1c4b-4281-b951-d872f2087c98
* Animation code is not yet migrated by this patch, due to WebTransformOperations.shawnsingh@chromium.org2012-11-271-1/+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: Make RenderPass into a struct-like class.danakj@chromium.org2012-11-211-4/+4
| | | | | | | | | | | | | | | | | | | This follows the same pattern as DrawQuad and SharedQuadState. The Create() method takes no parameters, allowing the IPC code to create an empty RenderPass. Then we have SetNew() and SetAll() methods to set the the properties of the RenderPass when creating a new one, or when recreating one via IPC, respectively. Covered by existing tests. BUG=152337 TBR=aelias Review URL: https://chromiumcodereview.appspot.com/11413106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168998 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Don't return non-const Layer* from a const Layer.danakj@chromium.org2012-11-211-2/+2
| | | | | | | | | | | | Const methods should return const Layer*s. Non-const methods return non-const Layer*s. R=enne Review URL: https://chromiumcodereview.appspot.com/11299127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168973 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Turn SharedQuadState into a struct-like class similar to DrawQuads.danakj@chromium.org2012-11-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | SharedQuadState was a struct previously, but required all the data to be passed to its create() method. This makes the Create() method take no parameters, as DrawQuads work now. And we add a SetAll() method, similar again to DrawQuad. We remove the "id" value from ShardQuadState. This shouldn't be needed for serialization. We can instead just use the pointers in the quads as an id directly, and compare them against each other to see when we need to create a new shared quad state. This is sufficient since all quads that share an instance of SharedQuadState are appended to be adjacent in the quad list. Covered by existing tests. TBR=aelias BUG=152337 Depends on: https://codereview.chromium.org/11411050 Review URL: https://chromiumcodereview.appspot.com/11416088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168960 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Make the DrawQuad subclasses into a struct-like classes.danakj@chromium.org2012-11-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've replaced the create() and constructor on each class with a SetNew() method: void SetNew(const SharedQuadState* shared_quad_state, gfx::Rect rect, ...); This method sets everything in the base class, based on the subclass' interpretation of the minimal parameters given to it. This is used when creating a new quad of this type - hence the name. The "..." represents all the quad-type-specific arguments. I've also added a new SetAll() method, that takes all of the data held by this quad type, and simply passes on the appropriate things to the super class: void SetAll(const SharedQuadState* shared_quad_state, gfx::Rect rect, gfx::Rect opaque_rect, gfx::Rect visible_rect, bool needs_blending, ...); This method is used for deserializing, or other cases where you have all the data for the quad well defined, and want to set every field at once. The "..." represents all the quad-type-specific arguments. Added tests for SetAll() in cc_unittests:DrawQuadTest.* TBR=aelias BUG=152337 Review URL: https://chromiumcodereview.appspot.com/11411050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168903 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Turn DrawQuad into a struct-like class with public data members.danakj@chromium.org2012-11-171-8/+8
| | | | | | | | | | | | | | | | | | | We add a SetAll() method that sets everything to keep the compile-time guard that verifies everything gets set from all appropriate callsites. This replaces the constructor which now takes no arguments at all. We will replace the constructor with an overriding SetAll() for each subclass of DrawQuads and make them into structs as well. Covered by existing tests. TBR=aelias BUG=152337 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11418047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168460 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Convert DrawQuad to chromium style.danakj@chromium.org2012-11-171-9/+9
| | | | | | | | | | | | | | | | | | We leave the methods as methods instead of structifying it in this CL. But the opaqueRect() helper method on DrawQuad is moved out to the call sites. DrawQuad::needsBlending() is moved to DrawQuad::ShouldDrawWithBlending() which combines together various states. DrawQuad::opaqueRect() is computed in QuadCuller, and is used more cleverly in ShouldDrawWithBlending(). TBR=aelias BUG=152337 Review URL: https://chromiumcodereview.appspot.com/11420044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168423 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Create cc::DebugColors class to hold all the debugging color/width ↵danakj@chromium.org2012-11-161-10/+6
| | | | | | | | | | | | | | | constants. This class has a bunch of static methods that provide colors and widths of debugging visualizations. It also will make things wider based on the current device scale factor, when it is available. R=enne BUG=160867 Review URL: https://codereview.chromium.org/11316026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168087 0039d316-1c4b-4281-b951-d872f2087c98
* Remove WTF and WebCore from cc/ and webkit/compositor_bindings/piman@chromium.org2012-11-101-2/+0
| | | | | | | | | | | 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
* 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: 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
* Remove most remaining references to IntRect and FloatRect.danakj@chromium.org2012-11-011-4/+4
| | | | | | | | | | | | | | | | 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
* Use gfx::Rect types for occlusion tracker and quad culler classes.danakj@chromium.org2012-10-311-5/+5
| | | | | | | | | | | | | This depends on the non-mutating methods for Rect operations: https://codereview.chromium.org/11270042/ Covered by existing tests, just changing data types. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11272045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165220 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clipping/culling for DelegatedRendererLayer*piman@chromium.org2012-10-301-1/+2
| | | | | | | | | | | | | | 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: Remove CC*.h temporary includes, part 6/4.tfarina@chromium.org2012-10-241-2/+2
| | | | | | | | | | | | 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: Remove CC*.h temporary includes, part 5/4.tfarina@chromium.org2012-10-231-1/+1
| | | | | | | | | | | | 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-5/+5
| | | | | | | | | | | 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: Remove CC*.h temporary includes, part 4/4.tfarina@chromium.org2012-10-221-4/+4
| | | | | | | | | | | | 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: Use ui/gfx geometry types for the CCRenderPass and CCDrawQuad classes.danakj@chromium.org2012-10-201-4/+4
| | | | | | | | | | | | | | | | | We use these geometry types for CCDrawQuad types and in CCRenderPass, and so we also make use of them in the CCRenderer classes. A minor number of copies back to cc:: (WebCore) geometry types do occur in the renderer implementations for now until we migrate the rest of the compositor. Covered by existing tests. BUG=152473 R=enne,jamesr Review URL: https://chromiumcodereview.appspot.com/10984053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163142 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "cc: Rename cc classes and members to match filenames"enne@chromium.org2012-10-191-5/+5
| | | | | | 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-5/+5
| | | | | | | | 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
* cc: Switch to Chromium DCHECKs LOGsdanakj@chromium.org2012-10-181-4/+4
| | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | | 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
* cc: Fix the include paths to skia header files.tfarina@chromium.org2012-10-161-1/+1
| | | | | | | | | | | BUG=155413 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/11146031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162088 0039d316-1c4b-4281-b951-d872f2087c98
* Remove USE(ACCELERATED_COMPOSITING) references from ccjamesr@chromium.org2012-10-151-3/+0
| | | | | | | | | | 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] Rename all cc/ filenames to Chromium styleenne@chromium.org2012-10-121-0/+94
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