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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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/layers/picture_layer_impl_perftest.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 26f3be56a23caebd6f0d03a887f10974c5c2ea59..1ed32874972cea3acad86707ce7e3ed0b14701e5 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -27,6 +27,7 @@
#include "cc/test/impl_side_painting_settings.h"
#include "cc/test/layer_test_common.h"
#include "cc/test/test_shared_bitmap_manager.h"
+#include "cc/test/test_task_graph_runner.h"
#include "cc/test/test_web_graphics_context_3d.h"
#include "cc/trees/layer_tree_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -71,7 +72,10 @@ class PictureLayerImplTest : public testing::Test {
public:
PictureLayerImplTest()
: proxy_(base::MessageLoopProxy::current()),
- host_impl_(LowResTilingsSettings(), &proxy_, &shared_bitmap_manager_),
+ host_impl_(LowResTilingsSettings(),
+ &proxy_,
+ &shared_bitmap_manager_,
+ &task_graph_runner_),
root_id_(6),
id_(7),
pending_layer_(nullptr),
@@ -82,7 +86,10 @@ class PictureLayerImplTest : public testing::Test {
explicit PictureLayerImplTest(const LayerTreeSettings& settings)
: proxy_(base::MessageLoopProxy::current()),
- host_impl_(settings, &proxy_, &shared_bitmap_manager_),
+ host_impl_(settings,
+ &proxy_,
+ &shared_bitmap_manager_,
+ &task_graph_runner_),
root_id_(6),
id_(7) {
host_impl_.SetViewportSize(gfx::Size(10000, 10000));
@@ -309,6 +316,7 @@ class PictureLayerImplTest : public testing::Test {
FakeImplProxy proxy_;
TestSharedBitmapManager shared_bitmap_manager_;
+ TestTaskGraphRunner task_graph_runner_;
FakeLayerTreeHostImpl host_impl_;
int root_id_;
int id_;
@@ -4942,6 +4950,8 @@ TEST_F(TileSizeTest, TileSizes) {
// The +2's below are for border texels.
host_impl_.SetUseGpuRasterization(true);
host_impl_.SetViewportSize(gfx::Size(2000, 2000));
+
+ layer->set_gpu_raster_max_texture_size(host_impl_.device_viewport_size());
result = layer->CalculateTileSize(gfx::Size(10000, 10000));
EXPECT_EQ(result.width(), 2000);
EXPECT_EQ(result.height(), 500 + 2);
@@ -4949,6 +4959,7 @@ TEST_F(TileSizeTest, TileSizes) {
// Clamp and round-up, when smaller than viewport.
// Tile-height doubles to 50% when width shrinks to <= 50%.
host_impl_.SetViewportSize(gfx::Size(1000, 1000));
+ layer->set_gpu_raster_max_texture_size(host_impl_.device_viewport_size());
result = layer->CalculateTileSize(gfx::Size(447, 10000));
EXPECT_EQ(result.width(), 448);
EXPECT_EQ(result.height(), 500 + 2);
« no previous file with comments | « cc/layers/picture_layer_impl_perftest.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698