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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1013273003: cc: Force an update on tile size after viewport resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: attempt 3? 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 6400 matching lines...) Expand 10 before | Expand all | Expand 10 after
6411 content_layer->SetDrawsContent(true); 6411 content_layer->SetDrawsContent(true);
6412 6412
6413 root->SetBounds(root_size); 6413 root->SetBounds(root_size);
6414 6414
6415 gfx::ScrollOffset scroll_offset(100000, 0); 6415 gfx::ScrollOffset scroll_offset(100000, 0);
6416 scrolling_layer->SetScrollClipLayer(root->id()); 6416 scrolling_layer->SetScrollClipLayer(root->id());
6417 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset); 6417 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset);
6418 6418
6419 host_impl_->ActivateSyncTree(); 6419 host_impl_->ActivateSyncTree();
6420 6420
6421 bool update_lcd_text = false; 6421 bool first_update_after_commit = false;
6422 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text); 6422 host_impl_->active_tree()->UpdateDrawProperties(first_update_after_commit);
6423 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size()); 6423 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size());
6424 6424
6425 LayerTreeHostImpl::FrameData frame; 6425 LayerTreeHostImpl::FrameData frame;
6426 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); 6426 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame));
6427 6427
6428 ASSERT_EQ(1u, frame.render_passes.size()); 6428 ASSERT_EQ(1u, frame.render_passes.size());
6429 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size()); 6429 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size());
6430 const DrawQuad* quad = frame.render_passes[0]->quad_list.front(); 6430 const DrawQuad* quad = frame.render_passes[0]->quad_list.front();
6431 6431
6432 bool antialiased = 6432 bool antialiased =
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
8475 // surface. 8475 // surface.
8476 EXPECT_EQ(0, num_lost_surfaces_); 8476 EXPECT_EQ(0, num_lost_surfaces_);
8477 host_impl_->DidLoseOutputSurface(); 8477 host_impl_->DidLoseOutputSurface();
8478 EXPECT_EQ(1, num_lost_surfaces_); 8478 EXPECT_EQ(1, num_lost_surfaces_);
8479 host_impl_->DidLoseOutputSurface(); 8479 host_impl_->DidLoseOutputSurface();
8480 EXPECT_LE(1, num_lost_surfaces_); 8480 EXPECT_LE(1, num_lost_surfaces_);
8481 } 8481 }
8482 8482
8483 } // namespace 8483 } // namespace
8484 } // namespace cc 8484 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698