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

Side by Side Diff: chrome/browser/android/compositor/layer/toolbar_layer.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/android/compositor/layer/toolbar_layer.h" 5 #include "chrome/browser/android/compositor/layer/toolbar_layer.h"
6 6
7 #include "cc/layers/solid_color_layer.h" 7 #include "cc/layers/solid_color_layer.h"
8 #include "cc/layers/ui_resource_layer.h" 8 #include "cc/layers/ui_resource_layer.h"
9 #include "cc/resources/scoped_ui_resource.h" 9 #include "cc/resources/scoped_ui_resource.h"
10 #include "content/public/browser/android/compositor.h" 10 #include "content/public/browser/android/compositor.h"
(...skipping 24 matching lines...) Expand all
35 // This layer effectively draws over the space it takes for shadows. Set the 35 // This layer effectively draws over the space it takes for shadows. Set the
36 // bounds to the non-shadow size so that other things can properly line up. 36 // bounds to the non-shadow size so that other things can properly line up.
37 // Padding height does not include the height of the tabstrip, so we add 37 // Padding height does not include the height of the tabstrip, so we add
38 // it explicitly by adding y offset. 38 // it explicitly by adding y offset.
39 gfx::Size size = gfx::Size( 39 gfx::Size size = gfx::Size(
40 resource->padding.width(), 40 resource->padding.width(),
41 resource->padding.height() + resource->padding.y()); 41 resource->padding.height() + resource->padding.y());
42 layer_->SetBounds(size); 42 layer_->SetBounds(size);
43 43
44 toolbar_background_layer_->SetBounds(resource->padding.size()); 44 toolbar_background_layer_->SetBounds(resource->padding.size());
45 toolbar_background_layer_->SetPosition(resource->padding.origin()); 45 toolbar_background_layer_->SetPosition(
46 gfx::PointF(resource->padding.origin()));
46 toolbar_background_layer_->SetBackgroundColor(toolbar_background_color); 47 toolbar_background_layer_->SetBackgroundColor(toolbar_background_color);
47 48
48 bitmap_layer_->SetUIResourceId(resource->ui_resource->id()); 49 bitmap_layer_->SetUIResourceId(resource->ui_resource->id());
49 bitmap_layer_->SetBounds(resource->size); 50 bitmap_layer_->SetBounds(resource->size);
50 51
51 anonymize_layer_->SetHideLayerAndSubtree(!anonymize); 52 anonymize_layer_->SetHideLayerAndSubtree(!anonymize);
52 if (anonymize) { 53 if (anonymize) {
53 anonymize_layer_->SetPosition(gfx::PointF(resource->aperture.origin())); 54 anonymize_layer_->SetPosition(gfx::PointF(resource->aperture.origin()));
54 anonymize_layer_->SetBounds(resource->aperture.size()); 55 anonymize_layer_->SetBounds(resource->aperture.size());
55 anonymize_layer_->SetBackgroundColor(toolbar_textbox_background_color); 56 anonymize_layer_->SetBackgroundColor(toolbar_textbox_background_color);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 debug_layer_->SetIsDrawable(true); 142 debug_layer_->SetIsDrawable(true);
142 debug_layer_->SetBackgroundColor(SK_ColorGREEN); 143 debug_layer_->SetBackgroundColor(SK_ColorGREEN);
143 debug_layer_->SetOpacity(0.5f); 144 debug_layer_->SetOpacity(0.5f);
144 } 145 }
145 146
146 ToolbarLayer::~ToolbarLayer() { 147 ToolbarLayer::~ToolbarLayer() {
147 } 148 }
148 149
149 } // namespace android 150 } // namespace android
150 } // namespace chrome 151 } // namespace chrome
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698