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

Side by Side Diff: cc/quads/draw_quad_unittest.cc

Issue 1405883002: cc: Remove the base RasterSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge more Created 5 years, 2 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 | « cc/playback/raster_source_helper.cc ('k') | cc/quads/picture_draw_quad.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/quads/draw_quad.h" 5 #include "cc/quads/draw_quad.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 659
660 TEST(DrawQuadTest, CopyPictureDrawQuad) { 660 TEST(DrawQuadTest, CopyPictureDrawQuad) {
661 gfx::Rect opaque_rect(33, 44, 22, 33); 661 gfx::Rect opaque_rect(33, 44, 22, 33);
662 gfx::Rect visible_rect(40, 50, 30, 20); 662 gfx::Rect visible_rect(40, 50, 30, 20);
663 gfx::RectF tex_coord_rect(31.f, 12.f, 54.f, 20.f); 663 gfx::RectF tex_coord_rect(31.f, 12.f, 54.f, 20.f);
664 gfx::Size texture_size(85, 32); 664 gfx::Size texture_size(85, 32);
665 bool nearest_neighbor = true; 665 bool nearest_neighbor = true;
666 ResourceFormat texture_format = RGBA_8888; 666 ResourceFormat texture_format = RGBA_8888;
667 gfx::Rect content_rect(30, 40, 20, 30); 667 gfx::Rect content_rect(30, 40, 20, 30);
668 float contents_scale = 3.141592f; 668 float contents_scale = 3.141592f;
669 scoped_refptr<RasterSource> raster_source = 669 scoped_refptr<DisplayListRasterSource> raster_source =
670 FakeDisplayListRasterSource::CreateEmpty(gfx::Size(100, 100)); 670 FakeDisplayListRasterSource::CreateEmpty(gfx::Size(100, 100));
671 CREATE_SHARED_STATE(); 671 CREATE_SHARED_STATE();
672 672
673 CREATE_QUAD_9_NEW(PictureDrawQuad, opaque_rect, visible_rect, tex_coord_rect, 673 CREATE_QUAD_9_NEW(PictureDrawQuad, opaque_rect, visible_rect, tex_coord_rect,
674 texture_size, nearest_neighbor, texture_format, 674 texture_size, nearest_neighbor, texture_format,
675 content_rect, contents_scale, raster_source); 675 content_rect, contents_scale, raster_source);
676 EXPECT_EQ(DrawQuad::PICTURE_CONTENT, copy_quad->material); 676 EXPECT_EQ(DrawQuad::PICTURE_CONTENT, copy_quad->material);
677 EXPECT_EQ(opaque_rect, copy_quad->opaque_rect); 677 EXPECT_EQ(opaque_rect, copy_quad->opaque_rect);
678 EXPECT_EQ(visible_rect, copy_quad->visible_rect); 678 EXPECT_EQ(visible_rect, copy_quad->visible_rect);
679 EXPECT_EQ(tex_coord_rect, copy_quad->tex_coord_rect); 679 EXPECT_EQ(tex_coord_rect, copy_quad->tex_coord_rect);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 // Disabled until picture draw quad is supported for ubercomp: crbug.com/231715 897 // Disabled until picture draw quad is supported for ubercomp: crbug.com/231715
898 TEST_F(DrawQuadIteratorTest, DISABLED_PictureDrawQuad) { 898 TEST_F(DrawQuadIteratorTest, DISABLED_PictureDrawQuad) {
899 gfx::Rect opaque_rect(33, 44, 22, 33); 899 gfx::Rect opaque_rect(33, 44, 22, 33);
900 gfx::Rect visible_rect(40, 50, 30, 20); 900 gfx::Rect visible_rect(40, 50, 30, 20);
901 gfx::RectF tex_coord_rect(31.f, 12.f, 54.f, 20.f); 901 gfx::RectF tex_coord_rect(31.f, 12.f, 54.f, 20.f);
902 gfx::Size texture_size(85, 32); 902 gfx::Size texture_size(85, 32);
903 bool nearest_neighbor = true; 903 bool nearest_neighbor = true;
904 ResourceFormat texture_format = RGBA_8888; 904 ResourceFormat texture_format = RGBA_8888;
905 gfx::Rect content_rect(30, 40, 20, 30); 905 gfx::Rect content_rect(30, 40, 20, 30);
906 float contents_scale = 3.141592f; 906 float contents_scale = 3.141592f;
907 scoped_refptr<RasterSource> raster_source = 907 scoped_refptr<DisplayListRasterSource> raster_source =
908 FakeDisplayListRasterSource::CreateEmpty(gfx::Size(100, 100)); 908 FakeDisplayListRasterSource::CreateEmpty(gfx::Size(100, 100));
909 909
910 CREATE_SHARED_STATE(); 910 CREATE_SHARED_STATE();
911 CREATE_QUAD_9_NEW(PictureDrawQuad, opaque_rect, visible_rect, tex_coord_rect, 911 CREATE_QUAD_9_NEW(PictureDrawQuad, opaque_rect, visible_rect, tex_coord_rect,
912 texture_size, nearest_neighbor, texture_format, 912 texture_size, nearest_neighbor, texture_format,
913 content_rect, contents_scale, raster_source); 913 content_rect, contents_scale, raster_source);
914 EXPECT_EQ(0, IterateAndCount(quad_new)); 914 EXPECT_EQ(0, IterateAndCount(quad_new));
915 } 915 }
916 916
917 TEST(DrawQuadTest, LargestQuadType) { 917 TEST(DrawQuadTest, LargestQuadType) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 LOG(ERROR) << "YUVVideoDrawQuad " << sizeof(YUVVideoDrawQuad); 994 LOG(ERROR) << "YUVVideoDrawQuad " << sizeof(YUVVideoDrawQuad);
995 break; 995 break;
996 case DrawQuad::INVALID: 996 case DrawQuad::INVALID:
997 break; 997 break;
998 } 998 }
999 } 999 }
1000 } 1000 }
1001 1001
1002 } // namespace 1002 } // namespace
1003 } // namespace cc 1003 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/raster_source_helper.cc ('k') | cc/quads/picture_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698