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

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

Issue 913203006: cc: Calculate "can use lcd text" on the compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove tuple to fix Android compile Created 5 years, 10 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/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('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 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 6435 matching lines...) Expand 10 before | Expand all | Expand 10 after
6446 content_layer->SetDrawsContent(true); 6446 content_layer->SetDrawsContent(true);
6447 6447
6448 root->SetBounds(root_size); 6448 root->SetBounds(root_size);
6449 6449
6450 gfx::ScrollOffset scroll_offset(100000, 0); 6450 gfx::ScrollOffset scroll_offset(100000, 0);
6451 scrolling_layer->SetScrollClipLayer(root->id()); 6451 scrolling_layer->SetScrollClipLayer(root->id());
6452 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset); 6452 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset);
6453 6453
6454 host_impl_->ActivateSyncTree(); 6454 host_impl_->ActivateSyncTree();
6455 6455
6456 host_impl_->active_tree()->UpdateDrawProperties(); 6456 bool update_lcd_text = false;
6457 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text);
6457 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size()); 6458 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size());
6458 6459
6459 LayerTreeHostImpl::FrameData frame; 6460 LayerTreeHostImpl::FrameData frame;
6460 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); 6461 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame));
6461 6462
6462 ASSERT_EQ(1u, frame.render_passes.size()); 6463 ASSERT_EQ(1u, frame.render_passes.size());
6463 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size()); 6464 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size());
6464 const DrawQuad* quad = frame.render_passes[0]->quad_list.front(); 6465 const DrawQuad* quad = frame.render_passes[0]->quad_list.front();
6465 6466
6466 bool antialiased = 6467 bool antialiased =
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
8416 // surface. 8417 // surface.
8417 EXPECT_EQ(0, num_lost_surfaces_); 8418 EXPECT_EQ(0, num_lost_surfaces_);
8418 host_impl_->DidLoseOutputSurface(); 8419 host_impl_->DidLoseOutputSurface();
8419 EXPECT_EQ(1, num_lost_surfaces_); 8420 EXPECT_EQ(1, num_lost_surfaces_);
8420 host_impl_->DidLoseOutputSurface(); 8421 host_impl_->DidLoseOutputSurface();
8421 EXPECT_LE(1, num_lost_surfaces_); 8422 EXPECT_LE(1, num_lost_surfaces_);
8422 } 8423 }
8423 8424
8424 } // namespace 8425 } // namespace
8425 } // namespace cc 8426 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698