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

Side by Side Diff: cc/stubs/int_rect.h

Issue 11360066: cc: Remove WebCore rect use from the compositor, except within Region. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Signs Created 8 years, 1 month 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 | « cc/stubs/float_rect.h ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_STUBS_INTRECT_H_
6 #define CC_STUBS_INTRECT_H_
7
8 #include "IntPoint.h"
9 #include "IntSize.h"
10 #if INSIDE_WEBKIT_BUILD
11 #include "Source/WebCore/platform/graphics/IntRect.h"
12 #else
13 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntRect.h"
14 #endif
15 #include "ui/gfx/rect.h"
16
17 #if defined(OS_MACOSX)
18 #include <ApplicationServices/ApplicationServices.h>
19 #endif
20
21 namespace cc {
22
23 class IntRect : public WebCore::IntRect {
24 public:
25 IntRect() { }
26
27 IntRect(const IntPoint& location, const IntSize& size)
28 : WebCore::IntRect(location, size)
29 {
30 }
31
32 IntRect(int x, int y, int width, int height)
33 : WebCore::IntRect(x, y, width, height)
34 {
35 }
36
37 IntRect(WebCore::IntRect rect)
38 : WebCore::IntRect(rect.x(), rect.y(), rect.width(), rect.height())
39 {
40
41 }
42
43 explicit IntRect(gfx::Rect rect)
44 : WebCore::IntRect(rect.x(), rect.y(), rect.width(), rect.height())
45 {
46 }
47
48 operator gfx::Rect() const { return gfx::Rect(x(), y(), width(), height()); }
49
50 IntPoint location() const { return WebCore::IntRect::location(); }
51 IntSize size() const { return WebCore::IntRect::size(); }
52
53 private:
54 #if defined(OS_MACOSX)
55 operator CGRect() const;
56 #endif
57 };
58
59 }
60
61 #endif
OLDNEW
« no previous file with comments | « cc/stubs/float_rect.h ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698