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

Side by Side Diff: chrome/browser/views/tabs/tab_renderer.cc

Issue 13726: Move Image operations and convolver to the skia namespace and clean up a few ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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
« no previous file with comments | « chrome/browser/importer/importer.cc ('k') | chrome/common/gfx/icon_util.cc » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <limits> 5 #include <limits>
6 6
7 #include "chrome/browser/views/tabs/tab_renderer.h" 7 #include "chrome/browser/views/tabs/tab_renderer.h"
8 8
9 #include "chrome/app/theme/theme_resources.h" 9 #include "chrome/app/theme/theme_resources.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 void TabRenderer::PaintActiveTabBackground(ChromeCanvas* canvas) { 579 void TabRenderer::PaintActiveTabBackground(ChromeCanvas* canvas) {
580 canvas->DrawBitmapInt(*tab_active_l, 0, 0); 580 canvas->DrawBitmapInt(*tab_active_l, 0, 0);
581 canvas->TileImageInt(*tab_active_c, tab_active_l_width, 0, 581 canvas->TileImageInt(*tab_active_c, tab_active_l_width, 0,
582 width() - tab_active_l_width - tab_active_r_width, height()); 582 width() - tab_active_l_width - tab_active_r_width, height());
583 canvas->DrawBitmapInt(*tab_active_r, width() - tab_active_r_width, 0); 583 canvas->DrawBitmapInt(*tab_active_r, width() - tab_active_r_width, 0);
584 } 584 }
585 585
586 void TabRenderer::PaintHoverTabBackground(ChromeCanvas* canvas, 586 void TabRenderer::PaintHoverTabBackground(ChromeCanvas* canvas,
587 double opacity) { 587 double opacity) {
588 bool is_otr = data_.off_the_record; 588 bool is_otr = data_.off_the_record;
589 SkBitmap left = gfx::ImageOperations::CreateBlendedBitmap( 589 SkBitmap left = skia::ImageOperations::CreateBlendedBitmap(
590 (is_otr ? *tab_inactive_otr_l : *tab_inactive_l), 590 (is_otr ? *tab_inactive_otr_l : *tab_inactive_l),
591 *tab_hover_l, opacity); 591 *tab_hover_l, opacity);
592 SkBitmap center = gfx::ImageOperations::CreateBlendedBitmap( 592 SkBitmap center = skia::ImageOperations::CreateBlendedBitmap(
593 (is_otr ? *tab_inactive_otr_c : *tab_inactive_c), 593 (is_otr ? *tab_inactive_otr_c : *tab_inactive_c),
594 *tab_hover_c, opacity); 594 *tab_hover_c, opacity);
595 SkBitmap right = gfx::ImageOperations::CreateBlendedBitmap( 595 SkBitmap right = skia::ImageOperations::CreateBlendedBitmap(
596 (is_otr ? *tab_inactive_otr_r : *tab_inactive_r), 596 (is_otr ? *tab_inactive_otr_r : *tab_inactive_r),
597 *tab_hover_r, opacity); 597 *tab_hover_r, opacity);
598 598
599 canvas->DrawBitmapInt(left, 0, 0); 599 canvas->DrawBitmapInt(left, 0, 0);
600 canvas->TileImageInt(center, tab_active_l_width, 0, 600 canvas->TileImageInt(center, tab_active_l_width, 0,
601 width() - tab_active_l_width - tab_active_r_width, height()); 601 width() - tab_active_l_width - tab_active_r_width, height());
602 canvas->DrawBitmapInt(right, width() - tab_active_r_width, 0); 602 canvas->DrawBitmapInt(right, width() - tab_active_r_width, 0);
603 } 603 }
604 604
605 void TabRenderer::PaintLoadingAnimation(ChromeCanvas* canvas) { 605 void TabRenderer::PaintLoadingAnimation(ChromeCanvas* canvas) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 } 671 }
672 672
673 void TabRenderer::DisplayCrashedFavIcon() { 673 void TabRenderer::DisplayCrashedFavIcon() {
674 should_display_crashed_favicon_ = true; 674 should_display_crashed_favicon_ = true;
675 } 675 }
676 676
677 void TabRenderer::ResetCrashedFavIcon() { 677 void TabRenderer::ResetCrashedFavIcon() {
678 should_display_crashed_favicon_ = false; 678 should_display_crashed_favicon_ = false;
679 } 679 }
680 680
OLDNEW
« no previous file with comments | « chrome/browser/importer/importer.cc ('k') | chrome/common/gfx/icon_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698