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

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

Issue 22529002: [cc] Allow resources and ui resources to specify wrap mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix botched resolve Created 7 years, 3 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/debug/test_web_graphics_context_3d.h" 10 #include "cc/debug/test_web_graphics_context_3d.h"
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 gfx::Rect child_rect(50, 50); 1182 gfx::Rect child_rect(50, 50);
1183 RenderPass::Id child_pass_id(2, 0); 1183 RenderPass::Id child_pass_id(2, 0);
1184 TestRenderPass* child_pass; 1184 TestRenderPass* child_pass;
1185 1185
1186 RenderPass::Id root_pass_id(1, 0); 1186 RenderPass::Id root_pass_id(1, 0);
1187 TestRenderPass* root_pass; 1187 TestRenderPass* root_pass;
1188 1188
1189 cc::ResourceProvider::ResourceId mask = 1189 cc::ResourceProvider::ResourceId mask =
1190 resource_provider_->CreateResource(gfx::Size(20, 12), 1190 resource_provider_->CreateResource(gfx::Size(20, 12),
1191 resource_provider_->best_texture_format(), 1191 resource_provider_->best_texture_format(),
1192 GL_CLAMP_TO_EDGE,
1192 ResourceProvider::TextureUsageAny); 1193 ResourceProvider::TextureUsageAny);
1193 resource_provider_->AllocateForTesting(mask); 1194 resource_provider_->AllocateForTesting(mask);
1194 1195
1195 SkScalar matrix[20]; 1196 SkScalar matrix[20];
1196 float amount = 0.5f; 1197 float amount = 0.5f;
1197 matrix[0] = 0.213f + 0.787f * amount; 1198 matrix[0] = 0.213f + 0.787f * amount;
1198 matrix[1] = 0.715f - 0.715f * amount; 1199 matrix[1] = 0.715f - 0.715f * amount;
1199 matrix[2] = 1.f - (matrix[0] + matrix[1]); 1200 matrix[2] = 1.f - (matrix[0] + matrix[1]);
1200 matrix[3] = matrix[4] = 0; 1201 matrix[3] = matrix[4] = 0;
1201 matrix[5] = 0.213f - 0.213f * amount; 1202 matrix[5] = 0.213f - 0.213f * amount;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 base::MessageLoop::current()->Run(); 1628 base::MessageLoop::current()->Run();
1628 1629
1629 // The sync point should have happened. 1630 // The sync point should have happened.
1630 EXPECT_EQ(1, sync_point_callback_count); 1631 EXPECT_EQ(1, sync_point_callback_count);
1631 EXPECT_EQ(1, other_callback_count); 1632 EXPECT_EQ(1, other_callback_count);
1632 } 1633 }
1633 #endif // OS_ANDROID 1634 #endif // OS_ANDROID
1634 1635
1635 } // namespace 1636 } // namespace
1636 } // namespace cc 1637 } // 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