OLD | NEW |
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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 | 1359 |
1360 gfx::Rect child_rect(50, 50); | 1360 gfx::Rect child_rect(50, 50); |
1361 RenderPassId child_pass_id(2, 0); | 1361 RenderPassId child_pass_id(2, 0); |
1362 RenderPass* child_pass; | 1362 RenderPass* child_pass; |
1363 | 1363 |
1364 RenderPassId root_pass_id(1, 0); | 1364 RenderPassId root_pass_id(1, 0); |
1365 RenderPass* root_pass; | 1365 RenderPass* root_pass; |
1366 | 1366 |
1367 ResourceId mask = resource_provider_->CreateResource( | 1367 ResourceId mask = resource_provider_->CreateResource( |
1368 gfx::Size(20, 12), ResourceProvider::TEXTURE_HINT_IMMUTABLE, | 1368 gfx::Size(20, 12), ResourceProvider::TEXTURE_HINT_IMMUTABLE, |
1369 resource_provider_->best_texture_format()); | 1369 resource_provider_->best_texture_format(), gfx::ColorSpace()); |
1370 resource_provider_->AllocateForTesting(mask); | 1370 resource_provider_->AllocateForTesting(mask); |
1371 | 1371 |
1372 SkScalar matrix[20]; | 1372 SkScalar matrix[20]; |
1373 float amount = 0.5f; | 1373 float amount = 0.5f; |
1374 matrix[0] = 0.213f + 0.787f * amount; | 1374 matrix[0] = 0.213f + 0.787f * amount; |
1375 matrix[1] = 0.715f - 0.715f * amount; | 1375 matrix[1] = 0.715f - 0.715f * amount; |
1376 matrix[2] = 1.f - (matrix[0] + matrix[1]); | 1376 matrix[2] = 1.f - (matrix[0] + matrix[1]); |
1377 matrix[3] = matrix[4] = 0; | 1377 matrix[3] = matrix[4] = 0; |
1378 matrix[5] = 0.213f - 0.213f * amount; | 1378 matrix[5] = 0.213f - 0.213f * amount; |
1379 matrix[6] = 0.715f + 0.285f * amount; | 1379 matrix[6] = 0.715f + 0.285f * amount; |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2145 TEST_F(GLRendererPartialSwapTest, PartialSwap) { | 2145 TEST_F(GLRendererPartialSwapTest, PartialSwap) { |
2146 RunTest(true); | 2146 RunTest(true); |
2147 } | 2147 } |
2148 | 2148 |
2149 TEST_F(GLRendererPartialSwapTest, NoPartialSwap) { | 2149 TEST_F(GLRendererPartialSwapTest, NoPartialSwap) { |
2150 RunTest(false); | 2150 RunTest(false); |
2151 } | 2151 } |
2152 | 2152 |
2153 } // namespace | 2153 } // namespace |
2154 } // namespace cc | 2154 } // namespace cc |
OLD | NEW |