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

Side by Side Diff: views/view.cc

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Pulled unnecessary changes out of this CL Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Creation and lifetime ------------------------------------------------------- 101 // Creation and lifetime -------------------------------------------------------
102 102
103 View::View() 103 View::View()
104 : parent_owned_(true), 104 : parent_owned_(true),
105 id_(0), 105 id_(0),
106 group_(-1), 106 group_(-1),
107 parent_(NULL), 107 parent_(NULL),
108 visible_(true), 108 visible_(true),
109 enabled_(true), 109 enabled_(true),
110 painting_enabled_(true),
110 registered_for_visible_bounds_notification_(false), 111 registered_for_visible_bounds_notification_(false),
111 clip_x_(0.0), 112 clip_x_(0.0),
112 clip_y_(0.0), 113 clip_y_(0.0),
113 needs_layout_(true), 114 needs_layout_(true),
114 flip_canvas_on_paint_for_rtl_ui_(false), 115 flip_canvas_on_paint_for_rtl_ui_(false),
115 accelerator_registration_delayed_(false), 116 accelerator_registration_delayed_(false),
116 accelerator_focus_manager_(NULL), 117 accelerator_focus_manager_(NULL),
117 registered_accelerator_count_(0), 118 registered_accelerator_count_(0),
118 next_focusable_view_(NULL), 119 next_focusable_view_(NULL),
119 previous_focusable_view_(NULL), 120 previous_focusable_view_(NULL),
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 687
687 void View::SchedulePaintInRect(const gfx::Rect& rect) { 688 void View::SchedulePaintInRect(const gfx::Rect& rect) {
688 if (!IsVisible()) 689 if (!IsVisible())
689 return; 690 return;
690 691
691 MarkLayerDirty(); 692 MarkLayerDirty();
692 SchedulePaintInternal(rect); 693 SchedulePaintInternal(rect);
693 } 694 }
694 695
695 void View::Paint(gfx::Canvas* canvas) { 696 void View::Paint(gfx::Canvas* canvas) {
696 if (!IsVisible()) 697 if (!IsVisible() || !painting_enabled_)
sky 2011/08/25 03:00:13 I'm still nervous about having this. If we're goin
697 return; 698 return;
698 699
699 ScopedCanvas scoped_canvas(NULL); 700 ScopedCanvas scoped_canvas(NULL);
700 scoped_ptr<gfx::Canvas> layer_canvas; 701 scoped_ptr<gfx::Canvas> layer_canvas;
701 gfx::Rect layer_rect; 702 gfx::Rect layer_rect;
702 703
703 if (layer()) { 704 if (layer()) {
704 gfx::Rect dirty_rect; 705 gfx::Rect dirty_rect;
705 if (!layer_helper_->clip_rect().IsEmpty()) { 706 if (!layer_helper_->clip_rect().IsEmpty()) {
706 dirty_rect = layer_helper_->clip_rect(); 707 dirty_rect = layer_helper_->clip_rect();
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 result.append(child_at(i)->PrintViewGraph(false)); 2072 result.append(child_at(i)->PrintViewGraph(false));
2072 2073
2073 if (first) 2074 if (first)
2074 result.append("}\n"); 2075 result.append("}\n");
2075 2076
2076 return result; 2077 return result;
2077 } 2078 }
2078 #endif 2079 #endif
2079 2080
2080 } // namespace views 2081 } // namespace views
OLDNEW
« views/animation/screen_rotation_setter.cc ('K') | « views/view.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698