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

Side by Side Diff: content/common/cc_messages.cc

Issue 698053002: Choose Largest DrawQuad Type No Longer Depended on Compiler Flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no const needed Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/quads/render_pass.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/output/filter_operations.h" 8 #include "cc/output/filter_operations.h"
9 #include "cc/quads/largest_draw_quad.h" 9 #include "cc/quads/largest_draw_quad.h"
10 #include "content/public/common/common_param_traits.h" 10 #include "content/public/common/common_param_traits.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 size_t to_reserve = sizeof(cc::RenderPass); 372 size_t to_reserve = sizeof(cc::RenderPass);
373 373
374 // Whether the quad points to a new shared quad state for each quad. 374 // Whether the quad points to a new shared quad state for each quad.
375 to_reserve += p.quad_list.size() * sizeof(bool); 375 to_reserve += p.quad_list.size() * sizeof(bool);
376 376
377 // Shared quad state is only written when a quad contains a shared quad state 377 // Shared quad state is only written when a quad contains a shared quad state
378 // that has not been written. 378 // that has not been written.
379 to_reserve += p.shared_quad_state_list.size() * sizeof(cc::SharedQuadState); 379 to_reserve += p.shared_quad_state_list.size() * sizeof(cc::SharedQuadState);
380 380
381 // The largest quad type, verified by a unit test. 381 // The largest quad type, verified by a unit test.
382 to_reserve += p.quad_list.size() * sizeof(cc::kLargestDrawQuad); 382 to_reserve += p.quad_list.size() * cc::LargestDrawQuadSize();
383 return to_reserve; 383 return to_reserve;
384 } 384 }
385 385
386 template <typename QuadType> 386 template <typename QuadType>
387 static cc::DrawQuad* ReadDrawQuad(const Message* m, 387 static cc::DrawQuad* ReadDrawQuad(const Message* m,
388 PickleIterator* iter, 388 PickleIterator* iter,
389 cc::RenderPass* render_pass) { 389 cc::RenderPass* render_pass) {
390 QuadType* quad = render_pass->CreateAndAppendDrawQuad<QuadType>(); 390 QuadType* quad = render_pass->CreateAndAppendDrawQuad<QuadType>();
391 if (!ReadParam(m, iter, quad)) 391 if (!ReadParam(m, iter, quad))
392 return NULL; 392 return NULL;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 l->append(", "); 788 l->append(", ");
789 LogParam(p.size, l); 789 LogParam(p.size, l);
790 l->append(", "); 790 l->append(", ");
791 LogParam(p.damage_rect, l); 791 LogParam(p.damage_rect, l);
792 l->append(", "); 792 l->append(", ");
793 LogParam(p.bitmap_id, l); 793 LogParam(p.bitmap_id, l);
794 l->append(")"); 794 l->append(")");
795 } 795 }
796 796
797 } // namespace IPC 797 } // namespace IPC
OLDNEW
« no previous file with comments | « cc/quads/render_pass.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698