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

Side by Side Diff: cc/resources/picture_layer_tiling_set_unittest.cc

Issue 12665005: cc: Use highp precision for texture coords if available and needed (Closed) Base URL: http://git.chromium.org/chromium/src.git@highp2
Patch Set: rebase after all dependencies landed Created 7 years, 8 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/output/texture_copier_unittest.cc ('k') | cc/resources/prioritized_resource_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 "cc/resources/picture_layer_tiling_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/resources/resource_pool.h" 9 #include "cc/resources/resource_pool.h"
10 #include "cc/resources/resource_provider.h" 10 #include "cc/resources/resource_provider.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 public: 56 public:
57 void runTest( 57 void runTest(
58 int num_tilings, 58 int num_tilings,
59 float min_scale, 59 float min_scale,
60 float scale_increment, 60 float scale_increment,
61 float ideal_contents_scale, 61 float ideal_contents_scale,
62 float expected_scale) { 62 float expected_scale) {
63 scoped_ptr<FakeOutputSurface> output_surface = 63 scoped_ptr<FakeOutputSurface> output_surface =
64 FakeOutputSurface::Create3d(); 64 FakeOutputSurface::Create3d();
65 scoped_ptr<ResourceProvider> resource_provider = 65 scoped_ptr<ResourceProvider> resource_provider =
66 ResourceProvider::Create(output_surface.get()); 66 ResourceProvider::Create(output_surface.get(), 0);
67 67
68 FakePictureLayerTilingClient client; 68 FakePictureLayerTilingClient client;
69 client.SetTileSize(gfx::Size(256, 256)); 69 client.SetTileSize(gfx::Size(256, 256));
70 PictureLayerTilingSet set(&client); 70 PictureLayerTilingSet set(&client);
71 71
72 gfx::Size layer_bounds(1000, 800); 72 gfx::Size layer_bounds(1000, 800);
73 set.SetLayerBounds(layer_bounds); 73 set.SetLayerBounds(layer_bounds);
74 74
75 float scale = min_scale; 75 float scale = min_scale;
76 for (int i = 0; i < num_tilings; ++i, scale += scale_increment) { 76 for (int i = 0; i < num_tilings; ++i, scale += scale_increment) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 TEST_F(PictureLayerTilingSetTestWithResources, ManyTilings_Equal) { 144 TEST_F(PictureLayerTilingSetTestWithResources, ManyTilings_Equal) {
145 runTest(10, 1.f, 1.f, 5.f, 5.f); 145 runTest(10, 1.f, 1.f, 5.f, 5.f);
146 } 146 }
147 147
148 TEST_F(PictureLayerTilingSetTestWithResources, ManyTilings_NotEqual) { 148 TEST_F(PictureLayerTilingSetTestWithResources, ManyTilings_NotEqual) {
149 runTest(10, 1.f, 1.f, 4.5f, 5.f); 149 runTest(10, 1.f, 1.f, 4.5f, 5.f);
150 } 150 }
151 151
152 } // namespace 152 } // namespace
153 } // namespace cc 153 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/texture_copier_unittest.cc ('k') | cc/resources/prioritized_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698