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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 11058003: No need to kClear_Mode a layer right after its created, as that will automatically (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 ui::ThemeProvider* tp = GetThemeProvider(); 707 ui::ThemeProvider* tp = GetThemeProvider();
708 gfx::ImageSkia* toolbar_left = tp->GetImageSkiaNamed( 708 gfx::ImageSkia* toolbar_left = tp->GetImageSkiaNamed(
709 IDR_CONTENT_TOP_LEFT_CORNER); 709 IDR_CONTENT_TOP_LEFT_CORNER);
710 int bottom_edge_height = std::min(toolbar_left->height(), h) - split_point; 710 int bottom_edge_height = std::min(toolbar_left->height(), h) - split_point;
711 711
712 // Split our canvas out so we can mask out the corners of the toolbar 712 // Split our canvas out so we can mask out the corners of the toolbar
713 // without masking out the frame. 713 // without masking out the frame.
714 canvas->SaveLayerAlpha( 714 canvas->SaveLayerAlpha(
715 255, gfx::Rect(x - kClientEdgeThickness, y, w + kClientEdgeThickness * 3, 715 255, gfx::Rect(x - kClientEdgeThickness, y, w + kClientEdgeThickness * 3,
716 h)); 716 h));
717 canvas->sk_canvas()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
718 717
719 // TODO(kuan): migrate background animation from cros to win by calling 718 // TODO(kuan): migrate background animation from cros to win by calling
720 // GetToolbarBackgound* with the correct mode, refer to 719 // GetToolbarBackgound* with the correct mode, refer to
721 // BrowserNonClientFrameViewAsh. 720 // BrowserNonClientFrameViewAsh.
722 SkColor background_color = browser_view()->GetToolbarBackgroundColor( 721 SkColor background_color = browser_view()->GetToolbarBackgroundColor(
723 browser_view()->browser()->search_model()->mode().mode); 722 browser_view()->browser()->search_model()->mode().mode);
724 gfx::ImageSkia* theme_toolbar = browser_view()->GetToolbarBackgroundImage( 723 gfx::ImageSkia* theme_toolbar = browser_view()->GetToolbarBackgroundImage(
725 browser_view()->browser()->search_model()->mode().mode); 724 browser_view()->browser()->search_model()->mode().mode);
726 725
727 // Paint the bottom rect. 726 // Paint the bottom rect.
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 1045
1047 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width, 1046 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width,
1048 int height) const { 1047 int height) const {
1049 int top_height = NonClientTopBorderHeight(false); 1048 int top_height = NonClientTopBorderHeight(false);
1050 int border_thickness = NonClientBorderThickness(); 1049 int border_thickness = NonClientBorderThickness();
1051 return gfx::Rect(border_thickness, top_height, 1050 return gfx::Rect(border_thickness, top_height,
1052 std::max(0, width - (2 * border_thickness)), 1051 std::max(0, width - (2 * border_thickness)),
1053 std::max(0, height - GetReservedHeight() - 1052 std::max(0, height - GetReservedHeight() -
1054 top_height - border_thickness)); 1053 top_height - border_thickness));
1055 } 1054 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | chrome/browser/ui/views/infobars/translate_infobar_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698