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

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

Issue 202763002: Switch to use SharedBitmapManager all the time in cc_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_utils_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 26 matching lines...) Expand all
37 bool fill_center, 37 bool fill_center,
38 size_t expected_quad_size) { 38 size_t expected_quad_size) {
39 MockQuadCuller quad_culler; 39 MockQuadCuller quad_culler;
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 FakeUIResourceLayerTreeHostImpl host_impl(&proxy); 47 TestSharedBitmapManager shared_bitmap_manager;
48 FakeUIResourceLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager);
48 scoped_ptr<NinePatchLayerImpl> layer = 49 scoped_ptr<NinePatchLayerImpl> layer =
49 NinePatchLayerImpl::Create(host_impl.active_tree(), 1); 50 NinePatchLayerImpl::Create(host_impl.active_tree(), 1);
50 layer->draw_properties().visible_content_rect = visible_content_rect; 51 layer->draw_properties().visible_content_rect = visible_content_rect;
51 layer->SetBounds(layer_size); 52 layer->SetBounds(layer_size);
52 layer->SetContentBounds(layer_size); 53 layer->SetContentBounds(layer_size);
53 layer->CreateRenderSurface(); 54 layer->CreateRenderSurface();
54 layer->draw_properties().render_target = layer.get(); 55 layer->draw_properties().render_target = layer.get();
55 56
56 UIResourceId uid = 1; 57 UIResourceId uid = 1;
57 SkBitmap skbitmap; 58 SkBitmap skbitmap;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 NinePatchLayerLayoutTest(bitmap_size, 152 NinePatchLayerLayoutTest(bitmap_size,
152 aperture_rect, 153 aperture_rect,
153 layer_size, 154 layer_size,
154 border, 155 border,
155 fill_center, 156 fill_center,
156 expected_quad_size); 157 expected_quad_size);
157 } 158 }
158 159
159 } // namespace 160 } // namespace
160 } // namespace cc 161 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_utils_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