summaryrefslogtreecommitdiffstats
path: root/cc/draw_quad.cc
Commit message (Collapse)AuthorAgeFilesLines
* cc: Implement DelegatingRender::drawFrame() method.danakj@chromium.org2013-01-161-0/+2
| | | | | | | | | | | | | | | | | | The method sends the render passes it is given to the parent compositor via the output surface. It should include a valid frame metadata with it. Tests: DelegatingRendererTestDraw.runSingleThread DelegatingRendererTestDraw.runMultiThread DelegatingRendererTestResources.runSingleThread DelegatingRendererTestResources.runMultiThread R=piman BUG=123444 Review URL: https://codereview.chromium.org/11777025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177073 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 175690estade@chromium.org2013-01-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | > cc: Implement DelegatingRender::drawFrame() method. > > The method sends the render passes it is given to the parent compositor via > the output surface. It should include a valid frame metadata with it. > > Tests: > DelegatingRendererTestDraw.runSingleThread > DelegatingRendererTestDraw.runMultiThread > DelegatingRendererTestResources.runSingleThread > DelegatingRendererTestResources.runMultiThread > > R=piman > BUG=123444 > > Review URL: https://chromiumcodereview.appspot.com/11777025 TBR=danakj@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175694 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Implement DelegatingRender::drawFrame() method.danakj@chromium.org2013-01-091-0/+2
| | | | | | | | | | | | | | | | | | The method sends the render passes it is given to the parent compositor via the output surface. It should include a valid frame metadata with it. Tests: DelegatingRendererTestDraw.runSingleThread DelegatingRendererTestDraw.runMultiThread DelegatingRendererTestResources.runSingleThread DelegatingRendererTestResources.runMultiThread R=piman BUG=123444 Review URL: https://chromiumcodereview.appspot.com/11777025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175690 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Make the DrawQuad subclasses into a struct-like classes.danakj@chromium.org2012-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-15/+24
| | | | | | | | | | | | | | | | | | | 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-51/+38
| | | | | | | | | | | | | | | | | | 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: Remove opaque flags from SharedQuadState and DrawQuaddanakj@chromium.org2012-11-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Now we will use the opaqueRect (already present on DrawQuad) to tell when things are opaque or not. Each Quad constructor that can be opaque take an opaqueRect. Generally, callers set it equal to the quadRect when contentsOpaque(). TiledLayerImpl can set it to a smaller rect sometimes since it has more knowledge. This made the scrollbar code a bit nicer for the thumb so that it doesn't need to set needs_blending anymore, as the thumb can be marked non-opaque. DebugBorderQuad sets an empty opaqueRect now, so it doesn't need to set needs_blending. Covered by existing tests. BUG=152337 R=enne Review URL: https://chromiumcodereview.appspot.com/11412044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168387 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Switch the DrawQuad enum names to chromium style and remove pragmasdanakj@chromium.org2012-11-161-11/+11
| | | | | | | | | | | Some cleanup in the direction of making DrawQuad a chromified struct. R=enne BUG=152337 Review URL: https://codereview.chromium.org/11417035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168301 0039d316-1c4b-4281-b951-d872f2087c98
* Remove WTF and WebCore from cc/ and webkit/compositor_bindings/piman@chromium.org2012-11-101-3/+1
| | | | | | | | | | | 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: 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
* Fix DrawQuad copypiman@chromium.org2012-10-311-27/+28
| | | | | | | | | | | | | | Creating a copy of the quads by allocating a bag of bytes is problematic because the delete doesn't match the new (new [] vs scalar delete), which is wrong in general but in particular causes asserts in tcmalloc and ASAN. Instead, do the proper C++ version, relying on implicit copy constructors. BUG=None Review URL: https://chromiumcodereview.appspot.com/11344050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165248 0039d316-1c4b-4281-b951-d872f2087c98
* Add non-member non-mutating methods for common gfx::Rect operations.danakj@chromium.org2012-10-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds non-member methods that return a new Rect (or RectF) object as their result instead of mutating an existing rect. We add: Rect gfx::IntersectRects(Rect, Rect) RectF gfx::IntersectRects(RectF, RectF) Rect gfx::UnionRects(Rect, Rect) RectF gfx::UnionRects(RectF, RectF) Rect gfx::SubtractRects(Rect, Rect) RectF gfx::SubtractRects(RectF, RectF) RectF gfx::ScaleRect(RectF, scale) RectF gfx::ScaleRect(RectF, x_scale, y_scale) In CL https://codereview.chromium.org/11110004/ we made all member methods of Rect (and RectF) mutate the existing object, so these methods are added for cases where we want the result to create a new object instead. BUG=147395 R=sky Review URL: https://codereview.chromium.org/11270042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164760 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove CC*.h temporary includes, part 6/4.tfarina@chromium.org2012-10-241-3/+3
| | | | | | | | | | | | 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
* Make gfx::Rect class operations consistently mutate the class they are ↵danakj@chromium.org2012-10-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | called on. Currently some methods mutate the class, and some return a new value, requiring API users to know what kind of method they are calling each time, and making inconsistent code. For example: gfx::Rect rect; rect.Inset(1, 1, 1, 1); rect = rect.Intersect(other_rect); rect.Offset(1, 1); Instead of: gfx::Rect rect; rect.Inset(1, 1, 1, 1); rect.Intersect(other_rect); rect.Offset(1, 1); We could go either way - making the class immutable or all methods return a new instance - but I believe it is better to instead make all methods mutate the class. This allows for shorter lines of code by avoiding having to repeat the object's name twice in order to change it. This patch changes gfx::Rect classes and all the callsites that uses these methods. It should make no change in behaviour, so no new tests added. R=sky BUG=147395 Review URL: https://codereview.chromium.org/11110004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163579 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-17/+17
| | | | | | | | | | | 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-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-2/+2
| | | | | | | | | | | 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
* cc: Use ui/gfx geometry types for the CCRenderPass and CCDrawQuad classes.danakj@chromium.org2012-10-201-8/+5
| | | | | | | | | | | | | | | | | 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-17/+17
| | | | | | 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-17/+17
| | | | | | | | 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-4/+5
| | | | | | | | | | | | | | | | 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-5/+4
| | | | | | | 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-4/+5
| | | | | | | | | | | 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: Switch to Chromium DCHECKs LOGsdanakj@chromium.org2012-10-181-4/+5
| | | | | | | | | | | | | | | 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-5/+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/+5
| | | | | | | | | | | | | | 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] Rename all cc/ filenames to Chromium styleenne@chromium.org2012-10-121-0/+100
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