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

Side by Side Diff: cc/proxy.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: Move ui/gfx changes to cc/geometry.h 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/page_scale_animation.cc ('k') | cc/scrollbar_animation_controller.h » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CCProxy_h 5 #ifndef CCProxy_h
6 #define CCProxy_h 6 #define CCProxy_h
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include <public/WebCompositorOutputSurface.h> 11 #include <public/WebCompositorOutputSurface.h>
12 #include "cc/cc_export.h" 12 #include "cc/cc_export.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 class Rect; 15 class Rect;
16 class Vector2d;
16 } 17 }
17 18
18 namespace cc { 19 namespace cc {
19 20
20 class Thread; 21 class Thread;
21 class IntSize;
22 struct RenderingStats; 22 struct RenderingStats;
23 struct RendererCapabilities; 23 struct RendererCapabilities;
24 24
25 // Abstract class responsible for proxying commands from the main-thread side of 25 // Abstract class responsible for proxying commands from the main-thread side of
26 // the compositor over to the compositor implementation. 26 // the compositor over to the compositor implementation.
27 class CC_EXPORT Proxy { 27 class CC_EXPORT Proxy {
28 public: 28 public:
29 static void setMainThread(Thread*); 29 static void setMainThread(Thread*);
30 static Thread* mainThread(); 30 static Thread* mainThread();
31 31
32 static bool hasImplThread(); 32 static bool hasImplThread();
33 static void setImplThread(Thread*); 33 static void setImplThread(Thread*);
34 static Thread* implThread(); 34 static Thread* implThread();
35 35
36 // Returns 0 if the current thread is neither the main thread nor the impl t hread. 36 // Returns 0 if the current thread is neither the main thread nor the impl t hread.
37 static Thread* currentThread(); 37 static Thread* currentThread();
38 38
39 virtual ~Proxy(); 39 virtual ~Proxy();
40 40
41 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) = 0; 41 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) = 0;
42 42
43 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, base::TimeDelta duration) = 0; 43 virtual void startPageScaleAnimation(gfx::Vector2d targetOffet, bool useAnch or, float scale, base::TimeDelta duration) = 0;
enne (OOO) 2012/11/03 03:54:18 Typo.
danakj 2012/11/03 13:45:04 Done.
44 44
45 virtual void finishAllRendering() = 0; 45 virtual void finishAllRendering() = 0;
46 46
47 virtual bool isStarted() const = 0; 47 virtual bool isStarted() const = 0;
48 48
49 // Attempts to initialize a context to use for rendering. Returns false if t he context could not be created. 49 // Attempts to initialize a context to use for rendering. Returns false if t he context could not be created.
50 // The context will not be used and no frames may be produced until initiali zeRenderer() is called. 50 // The context will not be used and no frames may be produced until initiali zeRenderer() is called.
51 virtual bool initializeContext() = 0; 51 virtual bool initializeContext() = 0;
52 52
53 // Indicates that the compositing surface associated with our context is rea dy to use. 53 // Indicates that the compositing surface associated with our context is rea dy to use.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #ifndef NDEBUG 128 #ifndef NDEBUG
129 DCHECK(Proxy::isMainThreadBlocked()); 129 DCHECK(Proxy::isMainThreadBlocked());
130 Proxy::setMainThreadBlocked(false); 130 Proxy::setMainThreadBlocked(false);
131 #endif 131 #endif
132 } 132 }
133 }; 133 };
134 134
135 } 135 }
136 136
137 #endif 137 #endif
OLDNEW
« no previous file with comments | « cc/page_scale_animation.cc ('k') | cc/scrollbar_animation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698