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

Side by Side Diff: sky/engine/platform/Widget.h

Issue 842113005: Delete a bunch of noop paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix comment Created 5 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008 Collabora Ltd. All rights reserved. 3 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual void setFrameRect(const IntRect& frame) { m_frame = frame; } 56 virtual void setFrameRect(const IntRect& frame) { m_frame = frame; }
57 const IntRect& frameRect() const { return m_frame; } 57 const IntRect& frameRect() const { return m_frame; }
58 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); } 58 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); }
59 59
60 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); } 60 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); }
61 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); } 61 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); }
62 void move(int x, int y) { setFrameRect(IntRect(x, y, width(), height())); } 62 void move(int x, int y) { setFrameRect(IntRect(x, y, width(), height())); }
63 void move(const IntPoint& p) { setFrameRect(IntRect(p, size())); } 63 void move(const IntPoint& p) { setFrameRect(IntRect(p, size())); }
64 64
65 virtual void paint(GraphicsContext*, const IntRect&) { } 65 virtual void paint(GraphicsContext*, const IntRect&) { }
66 void invalidate() { invalidateRect(boundsRect()); } 66 // FIXME(sky): Remove
67 virtual void invalidateRect(const IntRect&) = 0; 67 void invalidate() { }
68 68
69 virtual bool isFrameView() const { return false; } 69 virtual bool isFrameView() const { return false; }
70 virtual bool isScrollbar() const { return false; } 70 virtual bool isScrollbar() const { return false; }
71 71
72 virtual HostWindow* hostWindow() const { ASSERT_NOT_REACHED(); return 0; } 72 virtual HostWindow* hostWindow() const { ASSERT_NOT_REACHED(); return 0; }
73 Widget* parent() const { return m_parent; } 73 Widget* parent() const { return m_parent; }
74 Widget* root() const; 74 Widget* root() const;
75 75
76 // Virtual methods to convert points to/from the containing ScrollView 76 // Virtual methods to convert points to/from the containing ScrollView
77 virtual IntRect convertToContainingView(const IntRect& localRect) const { re turn localRect; } 77 virtual IntRect convertToContainingView(const IntRect& localRect) const { re turn localRect; }
78 virtual IntRect convertFromContainingView(const IntRect& localRect) const { return localRect; } 78 virtual IntRect convertFromContainingView(const IntRect& localRect) const { return localRect; }
79 virtual IntPoint convertToContainingView(const IntPoint& localPoint) const { return localPoint; } 79 virtual IntPoint convertToContainingView(const IntPoint& localPoint) const { return localPoint; }
80 virtual IntPoint convertFromContainingView(const IntPoint& localPoint) const { return localPoint; } 80 virtual IntPoint convertFromContainingView(const IntPoint& localPoint) const { return localPoint; }
81 81
82 private: 82 private:
83 Widget* m_parent; 83 Widget* m_parent;
84 IntRect m_frame; 84 IntRect m_frame;
85 }; 85 };
86 86
87 } // namespace blink 87 } // namespace blink
88 88
89 #endif // SKY_ENGINE_PLATFORM_WIDGET_H_ 89 #endif // SKY_ENGINE_PLATFORM_WIDGET_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/HostWindow.h ('k') | sky/engine/platform/graphics/Canvas2DImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698