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

Side by Side Diff: cc/proxy.h

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some missed intstuff 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
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 <public/WebCompositorOutputSurface.h> 10 #include <public/WebCompositorOutputSurface.h>
11 11
12 namespace gfx {
13 class Rect;
14 }
15
12 namespace cc { 16 namespace cc {
13 17
14 class Thread; 18 class Thread;
15 class IntRect;
16 class IntSize; 19 class IntSize;
17 struct RenderingStats; 20 struct RenderingStats;
18 struct RendererCapabilities; 21 struct RendererCapabilities;
19 22
20 // Abstract class responsible for proxying commands from the main-thread side of 23 // Abstract class responsible for proxying commands from the main-thread side of
21 // the compositor over to the compositor implementation. 24 // the compositor over to the compositor implementation.
22 class Proxy { 25 class Proxy {
23 public: 26 public:
24 static void setMainThread(Thread*); 27 static void setMainThread(Thread*);
25 static Thread* mainThread(); 28 static Thread* mainThread();
26 29
27 static bool hasImplThread(); 30 static bool hasImplThread();
28 static void setImplThread(Thread*); 31 static void setImplThread(Thread*);
29 static Thread* implThread(); 32 static Thread* implThread();
30 33
31 // Returns 0 if the current thread is neither the main thread nor the impl t hread. 34 // Returns 0 if the current thread is neither the main thread nor the impl t hread.
32 static Thread* currentThread(); 35 static Thread* currentThread();
33 36
34 virtual ~Proxy(); 37 virtual ~Proxy();
35 38
36 virtual bool compositeAndReadback(void *pixels, const IntRect&) = 0; 39 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) = 0;
37 40
38 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double durationSec) = 0; 41 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double durationSec) = 0;
39 42
40 virtual void finishAllRendering() = 0; 43 virtual void finishAllRendering() = 0;
41 44
42 virtual bool isStarted() const = 0; 45 virtual bool isStarted() const = 0;
43 46
44 // Attempts to initialize a context to use for rendering. Returns false if t he context could not be created. 47 // Attempts to initialize a context to use for rendering. Returns false if t he context could not be created.
45 // The context will not be used and no frames may be produced until initiali zeRenderer() is called. 48 // The context will not be used and no frames may be produced until initiali zeRenderer() is called.
46 virtual bool initializeContext() = 0; 49 virtual bool initializeContext() = 0;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 #ifndef NDEBUG 122 #ifndef NDEBUG
120 DCHECK(Proxy::isMainThreadBlocked()); 123 DCHECK(Proxy::isMainThreadBlocked());
121 Proxy::setMainThreadBlocked(false); 124 Proxy::setMainThreadBlocked(false);
122 #endif 125 #endif
123 } 126 }
124 }; 127 };
125 128
126 } 129 }
127 130
128 #endif 131 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698