| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/painted_scrollbar_layer_impl.h" | 5 #include "cc/layers/painted_scrollbar_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/input/scrollbar_animation_controller.h" | 10 #include "cc/input/scrollbar_animation_controller.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 RenderPass* render_pass, | 87 RenderPass* render_pass, |
| 88 AppendQuadsData* append_quads_data) { | 88 AppendQuadsData* append_quads_data) { |
| 89 bool premultipled_alpha = true; | 89 bool premultipled_alpha = true; |
| 90 bool flipped = false; | 90 bool flipped = false; |
| 91 bool nearest_neighbor = false; | 91 bool nearest_neighbor = false; |
| 92 gfx::PointF uv_top_left(0.f, 0.f); | 92 gfx::PointF uv_top_left(0.f, 0.f); |
| 93 gfx::PointF uv_bottom_right(1.f, 1.f); | 93 gfx::PointF uv_bottom_right(1.f, 1.f); |
| 94 | 94 |
| 95 SharedQuadState* shared_quad_state = | 95 SharedQuadState* shared_quad_state = |
| 96 render_pass->CreateAndAppendSharedQuadState(); | 96 render_pass->CreateAndAppendSharedQuadState(); |
| 97 PopulateScaledSharedQuadState(shared_quad_state, internal_contents_scale_); | 97 PopulateScaledSharedQuadState(shared_quad_state, internal_contents_scale_, |
| 98 internal_contents_scale_); |
| 98 | 99 |
| 99 AppendDebugBorderQuad(render_pass, internal_content_bounds_, | 100 AppendDebugBorderQuad(render_pass, internal_content_bounds_, |
| 100 shared_quad_state, append_quads_data); | 101 shared_quad_state, append_quads_data); |
| 101 | 102 |
| 102 gfx::Rect thumb_quad_rect = ComputeThumbQuadRect(); | 103 gfx::Rect thumb_quad_rect = ComputeThumbQuadRect(); |
| 103 gfx::Rect scaled_thumb_quad_rect = | 104 gfx::Rect scaled_thumb_quad_rect = |
| 104 gfx::ScaleToEnclosingRect(thumb_quad_rect, internal_contents_scale_); | 105 gfx::ScaleToEnclosingRect(thumb_quad_rect, internal_contents_scale_); |
| 105 gfx::Rect visible_thumb_quad_rect = | 106 gfx::Rect visible_thumb_quad_rect = |
| 106 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( | 107 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( |
| 107 thumb_quad_rect); | 108 thumb_quad_rect); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 203 |
| 203 bool PaintedScrollbarLayerImpl::IsThumbResizable() const { | 204 bool PaintedScrollbarLayerImpl::IsThumbResizable() const { |
| 204 return false; | 205 return false; |
| 205 } | 206 } |
| 206 | 207 |
| 207 const char* PaintedScrollbarLayerImpl::LayerTypeAsString() const { | 208 const char* PaintedScrollbarLayerImpl::LayerTypeAsString() const { |
| 208 return "cc::PaintedScrollbarLayerImpl"; | 209 return "cc::PaintedScrollbarLayerImpl"; |
| 209 } | 210 } |
| 210 | 211 |
| 211 } // namespace cc | 212 } // namespace cc |
| OLD | NEW |