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

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

Issue 11367080: cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/int_point.h ('k') | cc/test/fake_layer_tree_host_client.h » ('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_INTSIZE_H_
6 #define CC_STUBS_INTSIZE_H_
7
8 #if INSIDE_WEBKIT_BUILD
9 #include "Source/WebCore/platform/graphics/IntSize.h"
10 #else
11 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntSize.h"
12 #endif
13 #include "ui/gfx/size.h"
14 #include "ui/gfx/vector2d.h"
15
16 namespace cc {
17
18 class IntSize : public WebCore::IntSize {
19 public:
20 IntSize() { }
21
22 IntSize(int width, int height)
23 : WebCore::IntSize(width, height)
24 {
25 }
26
27 IntSize(WebCore::IntSize size)
28 : WebCore::IntSize(size.width(), size.height())
29 {
30
31 }
32
33 explicit IntSize(gfx::Size size)
34 : WebCore::IntSize(size.width(), size.height())
35 {
36 }
37
38 explicit IntSize(gfx::Vector2d vector)
39 : WebCore::IntSize(vector.x(), vector.y())
40 {
41 }
42
43 operator gfx::Size() const { return gfx::Size(width(), height()); }
44
45 operator gfx::Vector2d() const { return gfx::Vector2d(width(), height()); }
46 };
47
48 }
49
50 #endif
OLDNEW
« no previous file with comments | « cc/stubs/int_point.h ('k') | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698