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

Side by Side Diff: cc/output/gl_renderer_unittest.cc

Issue 486853002: cc: Use a normal texture for background texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits in unittests Created 6 years, 4 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/gl_renderer.cc ('k') | cc/output/renderer_pixeltest.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/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/output/compositor_frame_metadata.h" 10 #include "cc/output/compositor_frame_metadata.h"
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 gfx::Rect child_rect(50, 50); 1266 gfx::Rect child_rect(50, 50);
1267 RenderPass::Id child_pass_id(2, 0); 1267 RenderPass::Id child_pass_id(2, 0);
1268 TestRenderPass* child_pass; 1268 TestRenderPass* child_pass;
1269 1269
1270 RenderPass::Id root_pass_id(1, 0); 1270 RenderPass::Id root_pass_id(1, 0);
1271 TestRenderPass* root_pass; 1271 TestRenderPass* root_pass;
1272 1272
1273 ResourceProvider::ResourceId mask = resource_provider_->CreateResource( 1273 ResourceProvider::ResourceId mask = resource_provider_->CreateResource(
1274 gfx::Size(20, 12), 1274 gfx::Size(20, 12),
1275 GL_CLAMP_TO_EDGE, 1275 GL_CLAMP_TO_EDGE,
1276 ResourceProvider::TextureUsageAny, 1276 ResourceProvider::TextureHintImmutable,
1277 resource_provider_->best_texture_format()); 1277 resource_provider_->best_texture_format());
1278 resource_provider_->AllocateForTesting(mask); 1278 resource_provider_->AllocateForTesting(mask);
1279 1279
1280 SkScalar matrix[20]; 1280 SkScalar matrix[20];
1281 float amount = 0.5f; 1281 float amount = 0.5f;
1282 matrix[0] = 0.213f + 0.787f * amount; 1282 matrix[0] = 0.213f + 0.787f * amount;
1283 matrix[1] = 0.715f - 0.715f * amount; 1283 matrix[1] = 0.715f - 0.715f * amount;
1284 matrix[2] = 1.f - (matrix[0] + matrix[1]); 1284 matrix[2] = 1.f - (matrix[0] + matrix[1]);
1285 matrix[3] = matrix[4] = 0; 1285 matrix[3] = matrix[4] = 0;
1286 matrix[5] = 0.213f - 0.213f * amount; 1286 matrix[5] = 0.213f - 0.213f * amount;
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 base::MessageLoop::current()->Run(); 1762 base::MessageLoop::current()->Run();
1763 1763
1764 // The sync point should have happened. 1764 // The sync point should have happened.
1765 EXPECT_EQ(1, sync_point_callback_count); 1765 EXPECT_EQ(1, sync_point_callback_count);
1766 EXPECT_EQ(1, other_callback_count); 1766 EXPECT_EQ(1, other_callback_count);
1767 } 1767 }
1768 #endif // OS_ANDROID 1768 #endif // OS_ANDROID
1769 1769
1770 } // namespace 1770 } // namespace
1771 } // namespace cc 1771 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698