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

Unified Diff: content/common/gpu/gpu_memory_manager_unittest.cc

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_memory_manager_unittest.cc
diff --git a/content/common/gpu/gpu_memory_manager_unittest.cc b/content/common/gpu/gpu_memory_manager_unittest.cc
index 26891db7feae90c72048f29e37f1abe123c35992..035220884982aa9f32e958669fde880e49d0a66e 100644
--- a/content/common/gpu/gpu_memory_manager_unittest.cc
+++ b/content/common/gpu/gpu_memory_manager_unittest.cc
@@ -5,6 +5,7 @@
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/gpu_memory_allocation.h"
#include "content/common/gpu/gpu_memory_manager.h"
+#include "ui/gfx/size_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -549,7 +550,7 @@ TEST_F(GpuMemoryManagerTest, TestForegroundStubsGetBonusAllocationAndroid) {
GetAvailableGpuMemory()) {
size_t previous_allocation = stub.allocation_.gpu_resource_size_in_bytes;
- stub.size_ = stub.size_.Scale(1, 2);
+ stub.size_ = gfx::ToFlooredSize(stub.size_.Scale(1, 2));
Manage();
EXPECT_TRUE(IsAllocationForegroundForSurfaceYes(stub.allocation_));
@@ -562,7 +563,7 @@ TEST_F(GpuMemoryManagerTest, TestForegroundStubsGetBonusAllocationAndroid) {
}
// One final size increase to confirm it stays capped at maximum.
- stub.size_ = stub.size_.Scale(1, 2);
+ stub.size_ = gfx::ToFlooredSize(stub.size_.Scale(1, 2));
Manage();
EXPECT_TRUE(IsAllocationForegroundForSurfaceYes(stub.allocation_));

Powered by Google App Engine
This is Rietveld 408576698