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

Side by Side Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc

Issue 2230513005: Move visual rect unioning between paired items to cc::DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback. Created 4 years, 4 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/trees/layer_tree_host_pixeltest_tiles.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.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 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/ui/views/autofill/card_unmask_prompt_views.h" 5 #include "chrome/browser/ui/views/autofill/card_unmask_prompt_views.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 500
501 CardUnmaskPromptViews::FadeOutView::FadeOutView() 501 CardUnmaskPromptViews::FadeOutView::FadeOutView()
502 : fade_everything_(false), alpha_(255) { 502 : fade_everything_(false), alpha_(255) {
503 } 503 }
504 CardUnmaskPromptViews::FadeOutView::~FadeOutView() { 504 CardUnmaskPromptViews::FadeOutView::~FadeOutView() {
505 } 505 }
506 506
507 void CardUnmaskPromptViews::FadeOutView::PaintChildren( 507 void CardUnmaskPromptViews::FadeOutView::PaintChildren(
508 const ui::PaintContext& context) { 508 const ui::PaintContext& context) {
509 const bool kLcdTextRequiresOpaqueLayer = true; 509 const bool kLcdTextRequiresOpaqueLayer = true;
510 ui::CompositingRecorder recorder(context, size(), alpha_, 510 ui::CompositingRecorder recorder(context, alpha_,
511 kLcdTextRequiresOpaqueLayer); 511 kLcdTextRequiresOpaqueLayer);
512 views::View::PaintChildren(context); 512 views::View::PaintChildren(context);
513 } 513 }
514 514
515 void CardUnmaskPromptViews::FadeOutView::OnPaint(gfx::Canvas* canvas) { 515 void CardUnmaskPromptViews::FadeOutView::OnPaint(gfx::Canvas* canvas) {
516 if (!fade_everything_ || alpha_ == 255) 516 if (!fade_everything_ || alpha_ == 255)
517 return views::View::OnPaint(canvas); 517 return views::View::OnPaint(canvas);
518 518
519 canvas->SaveLayerAlpha(alpha_); 519 canvas->SaveLayerAlpha(alpha_);
520 views::View::OnPaint(canvas); 520 views::View::OnPaint(canvas);
521 canvas->Restore(); 521 canvas->Restore();
522 } 522 }
523 523
524 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { 524 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) {
525 alpha_ = alpha; 525 alpha_ = alpha;
526 SchedulePaint(); 526 SchedulePaint();
527 } 527 }
528 528
529 } // namespace autofill 529 } // namespace autofill
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698