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

Side by Side Diff: cc/layers/nine_patch_layer_impl_unittest.cc

Issue 1177033008: cc: Turn impl_side_painting and use_one_copy on in LayerTreeSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implon: fixwebkittests Created 5 years, 6 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/layers/layer_unittest.cc ('k') | cc/layers/nine_patch_layer_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "base/containers/hash_tables.h" 5 #include "base/containers/hash_tables.h"
6 #include "cc/layers/append_quads_data.h" 6 #include "cc/layers/append_quads_data.h"
7 #include "cc/layers/nine_patch_layer_impl.h" 7 #include "cc/layers/nine_patch_layer_impl.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "cc/resources/ui_resource_bitmap.h" 9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "cc/resources/ui_resource_client.h" 10 #include "cc/resources/ui_resource_client.h"
(...skipping 27 matching lines...) Expand all
38 size_t expected_quad_size) { 38 size_t expected_quad_size) {
39 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); 39 scoped_ptr<RenderPass> render_pass = RenderPass::Create();
40 gfx::Rect visible_content_rect(layer_size); 40 gfx::Rect visible_content_rect(layer_size);
41 gfx::Rect expected_remaining(border.x(), 41 gfx::Rect expected_remaining(border.x(),
42 border.y(), 42 border.y(),
43 layer_size.width() - border.width(), 43 layer_size.width() - border.width(),
44 layer_size.height() - border.height()); 44 layer_size.height() - border.height());
45 45
46 FakeImplProxy proxy; 46 FakeImplProxy proxy;
47 TestSharedBitmapManager shared_bitmap_manager; 47 TestSharedBitmapManager shared_bitmap_manager;
48 FakeUIResourceLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager); 48 TestTaskGraphRunner task_graph_runner;
49 FakeUIResourceLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
50 &task_graph_runner);
49 host_impl.InitializeRenderer(FakeOutputSurface::Create3d()); 51 host_impl.InitializeRenderer(FakeOutputSurface::Create3d());
50 52
51 scoped_ptr<NinePatchLayerImpl> layer = 53 scoped_ptr<NinePatchLayerImpl> layer =
52 NinePatchLayerImpl::Create(host_impl.active_tree(), 1); 54 NinePatchLayerImpl::Create(host_impl.active_tree(), 1);
53 layer->draw_properties().visible_content_rect = visible_content_rect; 55 layer->draw_properties().visible_content_rect = visible_content_rect;
54 layer->SetBounds(layer_size); 56 layer->SetBounds(layer_size);
55 layer->SetContentBounds(layer_size); 57 layer->SetContentBounds(layer_size);
56 layer->SetHasRenderSurface(true); 58 layer->SetHasRenderSurface(true);
57 layer->draw_properties().render_target = layer.get(); 59 layer->draw_properties().render_target = layer.get();
58 60
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 336
335 const QuadList &quad_list = impl.quad_list(); 337 const QuadList &quad_list = impl.quad_list();
336 for (QuadList::ConstBackToFrontIterator it = quad_list.BackToFrontBegin(); 338 for (QuadList::ConstBackToFrontIterator it = quad_list.BackToFrontBegin();
337 it != quad_list.BackToFrontEnd(); ++it) 339 it != quad_list.BackToFrontEnd(); ++it)
338 EXPECT_TRUE(it->ShouldDrawWithBlending()); 340 EXPECT_TRUE(it->ShouldDrawWithBlending());
339 } 341 }
340 } 342 }
341 343
342 } // namespace 344 } // namespace
343 } // namespace cc 345 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/nine_patch_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698