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

Side by Side Diff: cc/proxy.h

Issue 11191068: Remove WTF::currentTime() / WTF::monotonicallyIncreasingTime() uses from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/layer_tree_host_unittest.cc ('k') | cc/resource_update_controller.cc » ('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 <public/WebCompositorOutputSurface.h> 11 #include <public/WebCompositorOutputSurface.h>
11 12
12 namespace cc { 13 namespace cc {
13 14
14 class Thread; 15 class Thread;
15 class IntRect; 16 class IntRect;
16 class IntSize; 17 class IntSize;
17 struct RenderingStats; 18 struct RenderingStats;
18 struct RendererCapabilities; 19 struct RendererCapabilities;
19 20
20 // Abstract class responsible for proxying commands from the main-thread side of 21 // Abstract class responsible for proxying commands from the main-thread side of
21 // the compositor over to the compositor implementation. 22 // the compositor over to the compositor implementation.
22 class Proxy { 23 class Proxy {
23 public: 24 public:
24 static void setMainThread(Thread*); 25 static void setMainThread(Thread*);
25 static Thread* mainThread(); 26 static Thread* mainThread();
26 27
27 static bool hasImplThread(); 28 static bool hasImplThread();
28 static void setImplThread(Thread*); 29 static void setImplThread(Thread*);
29 static Thread* implThread(); 30 static Thread* implThread();
30 31
31 // Returns 0 if the current thread is neither the main thread nor the impl t hread. 32 // Returns 0 if the current thread is neither the main thread nor the impl t hread.
32 static Thread* currentThread(); 33 static Thread* currentThread();
33 34
34 virtual ~Proxy(); 35 virtual ~Proxy();
35 36
36 virtual bool compositeAndReadback(void *pixels, const IntRect&) = 0; 37 virtual bool compositeAndReadback(void *pixels, const IntRect&) = 0;
37 38
38 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double durationSec) = 0; 39 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, base::TimeDelta duration) = 0;
39 40
40 virtual void finishAllRendering() = 0; 41 virtual void finishAllRendering() = 0;
41 42
42 virtual bool isStarted() const = 0; 43 virtual bool isStarted() const = 0;
43 44
44 // Attempts to initialize a context to use for rendering. Returns false if t he context could not be created. 45 // 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. 46 // The context will not be used and no frames may be produced until initiali zeRenderer() is called.
46 virtual bool initializeContext() = 0; 47 virtual bool initializeContext() = 0;
47 48
48 // Indicates that the compositing surface associated with our context is rea dy to use. 49 // 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
123 #ifndef NDEBUG 124 #ifndef NDEBUG
124 DCHECK(Proxy::isMainThreadBlocked()); 125 DCHECK(Proxy::isMainThreadBlocked());
125 Proxy::setMainThreadBlocked(false); 126 Proxy::setMainThreadBlocked(false);
126 #endif 127 #endif
127 } 128 }
128 }; 129 };
129 130
130 } 131 }
131 132
132 #endif 133 #endif
OLDNEW
« no previous file with comments | « cc/layer_tree_host_unittest.cc ('k') | cc/resource_update_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698