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

Unified Diff: cc/resources/resource_provider_unittest.cc

Issue 12967018: cc: Avoid pointless gfx::Point/Size contructors when making Rects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RectFs as well Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_layer_tiling_unittest.cc ('k') | cc/scheduler/texture_uploader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider_unittest.cc
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index d8de6f562b5c83b7bf63a2eec8d27458020b3411..cb431abd67f0e0497180cc48a300b9f2c925b7dc 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -398,7 +398,7 @@ TEST_P(ResourceProviderTest, Basic) {
ExpectNumResources(1);
uint8_t data[4] = { 1, 2, 3, 4 };
- gfx::Rect rect(gfx::Point(), size);
+ gfx::Rect rect(size);
resource_provider_->SetPixels(id, data, rect, rect, gfx::Vector2d());
uint8_t result[4] = { 0 };
@@ -419,7 +419,7 @@ TEST_P(ResourceProviderTest, Upload) {
size, format, ResourceProvider::TextureUsageAny);
uint8_t image[16] = { 0 };
- gfx::Rect image_rect(gfx::Point(), size);
+ gfx::Rect image_rect(size);
resource_provider_->SetPixels(
id, image, image_rect, image_rect, gfx::Vector2d());
@@ -491,7 +491,7 @@ TEST_P(ResourceProviderTest, TransferResources) {
ResourceProvider::ResourceId id1 = child_resource_provider->CreateResource(
size, format, ResourceProvider::TextureUsageAny);
uint8_t data1[4] = { 1, 2, 3, 4 };
- gfx::Rect rect(gfx::Point(), size);
+ gfx::Rect rect(size);
child_resource_provider->SetPixels(id1, data1, rect, rect, gfx::Vector2d());
ResourceProvider::ResourceId id2 = child_resource_provider->CreateResource(
@@ -614,7 +614,7 @@ TEST_P(ResourceProviderTest, DeleteTransferredResources) {
ResourceProvider::ResourceId id = child_resource_provider->CreateResource(
size, format, ResourceProvider::TextureUsageAny);
uint8_t data[4] = { 1, 2, 3, 4 };
- gfx::Rect rect(gfx::Point(), size);
+ gfx::Rect rect(size);
child_resource_provider->SetPixels(id, data, rect, rect, gfx::Vector2d());
int child_id = resource_provider_->CreateChild();
@@ -671,7 +671,7 @@ TEST_P(ResourceProviderTest, TextureFilters) {
ResourceProvider::ResourceId id = child_resource_provider->CreateResource(
size, format, ResourceProvider::TextureUsageAny);
uint8_t data[4] = { 1, 2, 3, 4 };
- gfx::Rect rect(gfx::Point(), size);
+ gfx::Rect rect(size);
child_resource_provider->SetPixels(id, data, rect, rect, gfx::Vector2d());
EXPECT_EQ(GL_LINEAR, GetResourceFilter(child_resource_provider.get(), id));
SetResourceFilter(child_resource_provider.get(), id, GL_NEAREST);
« no previous file with comments | « cc/resources/picture_layer_tiling_unittest.cc ('k') | cc/scheduler/texture_uploader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698