Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Issue 11411050: cc: Make the DrawQuad subclasses into struct-like classes. (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
CC:
chromium-reviews, cc-bugs_chromium.org, piman, backer
Visibility:
Public.

Description

cc: Make the DrawQuad subclasses into a struct-like classes. 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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=168903

Patch Set 1 #

Patch Set 2 : Add test coverage for SetAll #

Patch Set 3 : Add DebugBorderDrawQuad #

Patch Set 4 : Add IOSurfaceDrawQuad #

Patch Set 5 : Add RenderPassDrawQuad #

Patch Set 6 : Add SolidColorDrawQuad #

Patch Set 7 : Add StreamVideoDrawQuad #

Patch Set 8 : Add TextureDrawQuad #

Patch Set 9 : Add TileDrawQuad #

Patch Set 10 : Add YUVVideoDrawQuad #

Patch Set 11 : Remove temporary things for the patch #

Patch Set 12 : Move constructors to the .cc files #

Patch Set 13 : Style fixin #

Patch Set 14 : Fix AA for tile quads. Don't ask IsAntialiased too early. #

Patch Set 15 : One more indent #

Patch Set 16 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1220 lines, -646 lines) Patch
M cc/checkerboard_draw_quad.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +16 lines, -7 lines 0 comments Download
M cc/checkerboard_draw_quad.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +28 lines, -14 lines 0 comments Download
M cc/debug_border_draw_quad.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +22 lines, -12 lines 0 comments Download
M cc/debug_border_draw_quad.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +35 lines, -15 lines 0 comments Download
M cc/delegated_renderer_layer_impl.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/delegated_renderer_layer_impl_unittest.cc View 1 2 3 4 5 3 chunks +22 lines, -6 lines 0 comments Download
M cc/draw_quad.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M cc/draw_quad_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +276 lines, -125 lines 0 comments Download
M cc/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 chunks +46 lines, -46 lines 0 comments Download
M cc/heads_up_display_layer_impl.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M cc/io_surface_draw_quad.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +31 lines, -19 lines 0 comments Download
M cc/io_surface_draw_quad.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +39 lines, -15 lines 0 comments Download
M cc/io_surface_layer_impl.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M cc/layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -1 line 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -5 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 19 chunks +38 lines, -33 lines 0 comments Download
M cc/nine_patch_layer_impl.cc View 1 2 3 4 5 6 7 1 chunk +32 lines, -8 lines 0 comments Download
M cc/nine_patch_layer_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M cc/picture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +13 lines, -12 lines 0 comments Download
M cc/quad_culler.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M cc/render_pass.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M cc/render_pass_draw_quad.h View 1 2 3 4 1 chunk +40 lines, -22 lines 0 comments Download
M cc/render_pass_draw_quad.cc View 1 2 3 4 1 chunk +77 lines, -30 lines 0 comments Download
M cc/render_pass_unittest.cc View 1 chunk +4 lines, -1 line 0 comments Download
M cc/render_surface_impl.cc View 1 2 3 4 2 chunks +7 lines, -3 lines 0 comments Download
M cc/scrollbar_layer_impl.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -3 lines 0 comments Download
M cc/software_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +25 lines, -25 lines 0 comments Download
M cc/software_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +12 lines, -8 lines 0 comments Download
M cc/solid_color_draw_quad.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +16 lines, -7 lines 0 comments Download
M cc/solid_color_draw_quad.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +28 lines, -14 lines 0 comments Download
M cc/solid_color_layer_impl.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M cc/solid_color_layer_impl_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M cc/stream_video_draw_quad.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +23 lines, -12 lines 0 comments Download
M cc/stream_video_draw_quad.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +32 lines, -14 lines 0 comments Download
M cc/test/render_pass_test_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +32 lines, -10 lines 0 comments Download
M cc/texture_draw_quad.h View 1 2 3 4 5 6 7 1 chunk +29 lines, -16 lines 0 comments Download
M cc/texture_draw_quad.cc View 1 2 3 4 5 6 7 1 chunk +44 lines, -16 lines 0 comments Download
M cc/texture_layer_impl.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M cc/tile_draw_quad.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +48 lines, -29 lines 0 comments Download
M cc/tile_draw_quad.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +66 lines, -20 lines 0 comments Download
M cc/tiled_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +14 lines, -5 lines 0 comments Download
M cc/tiled_layer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -4 lines 0 comments Download
M cc/video_layer_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -9 lines 0 comments Download
M cc/yuv_video_draw_quad.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +31 lines, -33 lines 0 comments Download
M cc/yuv_video_draw_quad.cc View 1 2 3 4 5 6 7 8 9 1 chunk +39 lines, -34 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
danakj
This is just the CheckerboardDrawQuad, all the other quads will look similar. I can do ...
8 years, 1 month ago (2012-11-17 00:06:45 UTC) #1
aelias_OOO_until_Jul13
lgtm. You can add them all here in a giant CL.
8 years, 1 month ago (2012-11-17 00:11:44 UTC) #2
danakj
On 2012/11/17 00:11:44, aelias wrote: > lgtm. You can add them all here in a ...
8 years, 1 month ago (2012-11-19 23:24:25 UTC) #3
aelias_OOO_until_Jul13
lgtm
8 years, 1 month ago (2012-11-20 01:51:00 UTC) #4
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
8 years, 1 month ago (2012-11-20 20:59:45 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11411050/13072
8 years, 1 month ago (2012-11-20 21:01:16 UTC) #6
commit-bot: I haz the power
8 years, 1 month ago (2012-11-20 23:06:29 UTC) #7
Change committed as 168903

Powered by Google App Engine
This is Rietveld 408576698