| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 SkColorGetG(color) * (1.0f / 255.0f), | 558 SkColorGetG(color) * (1.0f / 255.0f), |
| 559 SkColorGetB(color) * (1.0f / 255.0f), | 559 SkColorGetB(color) * (1.0f / 255.0f), |
| 560 1)); | 560 1)); |
| 561 | 561 |
| 562 const int checkerboard_width = 16; | 562 const int checkerboard_width = 16; |
| 563 float frequency = 1.0f / checkerboard_width; | 563 float frequency = 1.0f / checkerboard_width; |
| 564 | 564 |
| 565 gfx::Rect tile_rect = quad->rect; | 565 gfx::Rect tile_rect = quad->rect; |
| 566 float tex_offset_x = tile_rect.x() % checkerboard_width; | 566 float tex_offset_x = tile_rect.x() % checkerboard_width; |
| 567 float tex_offset_y = tile_rect.y() % checkerboard_width; | 567 float tex_offset_y = tile_rect.y() % checkerboard_width; |
| 568 float tex_scale_x = tile_rect.width(); | 568 float tex_scale_x = tile_rect.width() / quad->scale; |
| 569 float tex_scale_y = tile_rect.height(); | 569 float tex_scale_y = tile_rect.height() / quad->scale; |
| 570 GLC(gl_, | 570 GLC(gl_, |
| 571 gl_->Uniform4f(program->fragment_shader().tex_transform_location(), | 571 gl_->Uniform4f(program->fragment_shader().tex_transform_location(), |
| 572 tex_offset_x, | 572 tex_offset_x, |
| 573 tex_offset_y, | 573 tex_offset_y, |
| 574 tex_scale_x, | 574 tex_scale_x, |
| 575 tex_scale_y)); | 575 tex_scale_y)); |
| 576 | 576 |
| 577 GLC(gl_, | 577 GLC(gl_, |
| 578 gl_->Uniform1f(program->fragment_shader().frequency_location(), | 578 gl_->Uniform1f(program->fragment_shader().frequency_location(), |
| 579 frequency)); | 579 frequency)); |
| (...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3255 context_support_->ScheduleOverlayPlane( | 3255 context_support_->ScheduleOverlayPlane( |
| 3256 overlay.plane_z_order, | 3256 overlay.plane_z_order, |
| 3257 overlay.transform, | 3257 overlay.transform, |
| 3258 pending_overlay_resources_.back()->texture_id(), | 3258 pending_overlay_resources_.back()->texture_id(), |
| 3259 overlay.display_rect, | 3259 overlay.display_rect, |
| 3260 overlay.uv_rect); | 3260 overlay.uv_rect); |
| 3261 } | 3261 } |
| 3262 } | 3262 } |
| 3263 | 3263 |
| 3264 } // namespace cc | 3264 } // namespace cc |
| OLD | NEW |