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

Side by Side Diff: cc/layers/painted_scrollbar_layer_impl.cc

Issue 1144523003: Rename cc::ResourceProvider::ResourceId to cc::ResourceId and move it to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/layers/nine_patch_layer_impl.cc ('k') | cc/layers/picture_layer_impl.h » ('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 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 "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 gfx::Rect thumb_quad_rect = ComputeThumbQuadRect(); 89 gfx::Rect thumb_quad_rect = ComputeThumbQuadRect();
90 gfx::Rect scaled_thumb_quad_rect = 90 gfx::Rect scaled_thumb_quad_rect =
91 gfx::ScaleToEnclosingRect(thumb_quad_rect, internal_contents_scale_); 91 gfx::ScaleToEnclosingRect(thumb_quad_rect, internal_contents_scale_);
92 gfx::Rect visible_thumb_quad_rect = 92 gfx::Rect visible_thumb_quad_rect =
93 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( 93 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect(
94 thumb_quad_rect); 94 thumb_quad_rect);
95 gfx::Rect scaled_visible_thumb_quad_rect = gfx::ScaleToEnclosingRect( 95 gfx::Rect scaled_visible_thumb_quad_rect = gfx::ScaleToEnclosingRect(
96 visible_thumb_quad_rect, internal_contents_scale_); 96 visible_thumb_quad_rect, internal_contents_scale_);
97 97
98 ResourceProvider::ResourceId thumb_resource_id = 98 ResourceId thumb_resource_id =
99 layer_tree_impl()->ResourceIdForUIResource(thumb_ui_resource_id_); 99 layer_tree_impl()->ResourceIdForUIResource(thumb_ui_resource_id_);
100 ResourceProvider::ResourceId track_resource_id = 100 ResourceId track_resource_id =
101 layer_tree_impl()->ResourceIdForUIResource(track_ui_resource_id_); 101 layer_tree_impl()->ResourceIdForUIResource(track_ui_resource_id_);
102 102
103 if (thumb_resource_id && !visible_thumb_quad_rect.IsEmpty()) { 103 if (thumb_resource_id && !visible_thumb_quad_rect.IsEmpty()) {
104 gfx::Rect opaque_rect; 104 gfx::Rect opaque_rect;
105 const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; 105 const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
106 TextureDrawQuad* quad = 106 TextureDrawQuad* quad =
107 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); 107 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
108 quad->SetNew(shared_quad_state, scaled_thumb_quad_rect, opaque_rect, 108 quad->SetNew(shared_quad_state, scaled_thumb_quad_rect, opaque_rect,
109 scaled_visible_thumb_quad_rect, thumb_resource_id, 109 scaled_visible_thumb_quad_rect, thumb_resource_id,
110 premultipled_alpha, uv_top_left, uv_bottom_right, 110 premultipled_alpha, uv_top_left, uv_bottom_right,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 bool PaintedScrollbarLayerImpl::IsThumbResizable() const { 184 bool PaintedScrollbarLayerImpl::IsThumbResizable() const {
185 return false; 185 return false;
186 } 186 }
187 187
188 const char* PaintedScrollbarLayerImpl::LayerTypeAsString() const { 188 const char* PaintedScrollbarLayerImpl::LayerTypeAsString() const {
189 return "cc::PaintedScrollbarLayerImpl"; 189 return "cc::PaintedScrollbarLayerImpl";
190 } 190 }
191 191
192 } // namespace cc 192 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/nine_patch_layer_impl.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698