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

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

Issue 1271843005: cc: Remove code for drawing checkerboard quads, it's not used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-checkers: sizes Created 5 years, 4 months 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 | « content/common/cc_messages.h ('k') | content/common/cc_messages_unittest.cc » ('j') | 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/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 #include "cc/quads/largest_draw_quad.h" 10 #include "cc/quads/largest_draw_quad.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 for (const auto& quad : p.quad_list) { 310 for (const auto& quad : p.quad_list) {
311 DCHECK(quad->rect.Contains(quad->visible_rect)) 311 DCHECK(quad->rect.Contains(quad->visible_rect))
312 << quad->material << " rect: " << quad->rect.ToString() 312 << quad->material << " rect: " << quad->rect.ToString()
313 << " visible_rect: " << quad->visible_rect.ToString(); 313 << " visible_rect: " << quad->visible_rect.ToString();
314 DCHECK(quad->opaque_rect.IsEmpty() || 314 DCHECK(quad->opaque_rect.IsEmpty() ||
315 quad->rect.Contains(quad->opaque_rect)) 315 quad->rect.Contains(quad->opaque_rect))
316 << quad->material << " rect: " << quad->rect.ToString() 316 << quad->material << " rect: " << quad->rect.ToString()
317 << " opaque_rect: " << quad->opaque_rect.ToString(); 317 << " opaque_rect: " << quad->opaque_rect.ToString();
318 318
319 switch (quad->material) { 319 switch (quad->material) {
320 case cc::DrawQuad::CHECKERBOARD:
321 WriteParam(m, *cc::CheckerboardDrawQuad::MaterialCast(quad));
322 break;
323 case cc::DrawQuad::DEBUG_BORDER: 320 case cc::DrawQuad::DEBUG_BORDER:
324 WriteParam(m, *cc::DebugBorderDrawQuad::MaterialCast(quad)); 321 WriteParam(m, *cc::DebugBorderDrawQuad::MaterialCast(quad));
325 break; 322 break;
326 case cc::DrawQuad::IO_SURFACE_CONTENT: 323 case cc::DrawQuad::IO_SURFACE_CONTENT:
327 WriteParam(m, *cc::IOSurfaceDrawQuad::MaterialCast(quad)); 324 WriteParam(m, *cc::IOSurfaceDrawQuad::MaterialCast(quad));
328 break; 325 break;
329 case cc::DrawQuad::PICTURE_CONTENT: 326 case cc::DrawQuad::PICTURE_CONTENT:
330 NOTREACHED(); 327 NOTREACHED();
331 break; 328 break;
332 case cc::DrawQuad::TEXTURE_CONTENT: 329 case cc::DrawQuad::TEXTURE_CONTENT:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 p->referenced_surfaces.swap(referenced_surfaces); 427 p->referenced_surfaces.swap(referenced_surfaces);
431 428
432 for (size_t i = 0; i < quad_list_size; ++i) { 429 for (size_t i = 0; i < quad_list_size; ++i) {
433 cc::DrawQuad::Material material; 430 cc::DrawQuad::Material material;
434 base::PickleIterator temp_iter = *iter; 431 base::PickleIterator temp_iter = *iter;
435 if (!ReadParam(m, &temp_iter, &material)) 432 if (!ReadParam(m, &temp_iter, &material))
436 return false; 433 return false;
437 434
438 cc::DrawQuad* draw_quad = NULL; 435 cc::DrawQuad* draw_quad = NULL;
439 switch (material) { 436 switch (material) {
440 case cc::DrawQuad::CHECKERBOARD:
441 draw_quad = ReadDrawQuad<cc::CheckerboardDrawQuad>(m, iter, p);
442 break;
443 case cc::DrawQuad::DEBUG_BORDER: 437 case cc::DrawQuad::DEBUG_BORDER:
444 draw_quad = ReadDrawQuad<cc::DebugBorderDrawQuad>(m, iter, p); 438 draw_quad = ReadDrawQuad<cc::DebugBorderDrawQuad>(m, iter, p);
445 break; 439 break;
446 case cc::DrawQuad::IO_SURFACE_CONTENT: 440 case cc::DrawQuad::IO_SURFACE_CONTENT:
447 draw_quad = ReadDrawQuad<cc::IOSurfaceDrawQuad>(m, iter, p); 441 draw_quad = ReadDrawQuad<cc::IOSurfaceDrawQuad>(m, iter, p);
448 break; 442 break;
449 case cc::DrawQuad::PICTURE_CONTENT: 443 case cc::DrawQuad::PICTURE_CONTENT:
450 NOTREACHED(); 444 NOTREACHED();
451 return false; 445 return false;
452 case cc::DrawQuad::SURFACE_CONTENT: 446 case cc::DrawQuad::SURFACE_CONTENT:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 for (const auto& shared_quad_state : p.shared_quad_state_list) { 520 for (const auto& shared_quad_state : p.shared_quad_state_list) {
527 if (shared_quad_state != p.shared_quad_state_list.front()) 521 if (shared_quad_state != p.shared_quad_state_list.front())
528 l->append(", "); 522 l->append(", ");
529 LogParam(*shared_quad_state, l); 523 LogParam(*shared_quad_state, l);
530 } 524 }
531 l->append("], ["); 525 l->append("], [");
532 for (const auto& quad : p.quad_list) { 526 for (const auto& quad : p.quad_list) {
533 if (quad != p.quad_list.front()) 527 if (quad != p.quad_list.front())
534 l->append(", "); 528 l->append(", ");
535 switch (quad->material) { 529 switch (quad->material) {
536 case cc::DrawQuad::CHECKERBOARD:
537 LogParam(*cc::CheckerboardDrawQuad::MaterialCast(quad), l);
538 break;
539 case cc::DrawQuad::DEBUG_BORDER: 530 case cc::DrawQuad::DEBUG_BORDER:
540 LogParam(*cc::DebugBorderDrawQuad::MaterialCast(quad), l); 531 LogParam(*cc::DebugBorderDrawQuad::MaterialCast(quad), l);
541 break; 532 break;
542 case cc::DrawQuad::IO_SURFACE_CONTENT: 533 case cc::DrawQuad::IO_SURFACE_CONTENT:
543 LogParam(*cc::IOSurfaceDrawQuad::MaterialCast(quad), l); 534 LogParam(*cc::IOSurfaceDrawQuad::MaterialCast(quad), l);
544 break; 535 break;
545 case cc::DrawQuad::PICTURE_CONTENT: 536 case cc::DrawQuad::PICTURE_CONTENT:
546 NOTREACHED(); 537 NOTREACHED();
547 break; 538 break;
548 case cc::DrawQuad::TEXTURE_CONTENT: 539 case cc::DrawQuad::TEXTURE_CONTENT:
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 LogParam(p.size_in_pixels[i], l); 919 LogParam(p.size_in_pixels[i], l);
929 l->append(", "); 920 l->append(", ");
930 LogParam(p.allow_overlay[i], l); 921 LogParam(p.allow_overlay[i], l);
931 if (i < (cc::DrawQuad::Resources::kMaxResourceIdCount - 1)) 922 if (i < (cc::DrawQuad::Resources::kMaxResourceIdCount - 1))
932 l->append(", "); 923 l->append(", ");
933 } 924 }
934 l->append("])"); 925 l->append("])");
935 } 926 }
936 927
937 } // namespace IPC 928 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | content/common/cc_messages_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698