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

Side by Side Diff: cc/renderer.h

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor input event changes Created 8 years 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 CC_RENDERER_H_ 5 #ifndef CC_RENDERER_H_
6 #define CC_RENDERER_H_ 6 #define CC_RENDERER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/layer_tree_host.h" 10 #include "cc/layer_tree_host.h"
11 #include "cc/managed_memory_policy.h" 11 #include "cc/managed_memory_policy.h"
12 #include "cc/render_pass.h" 12 #include "cc/render_pass.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class CompositorFrameAck; 16 class CompositorFrameAck;
17 class ScopedResource; 17 class ScopedResource;
18 18
19 class CC_EXPORT RendererClient { 19 class CC_EXPORT RendererClient {
20 public: 20 public:
21 virtual const gfx::Size& deviceViewportSize() const = 0; 21 virtual const gfx::Size& deviceViewportSize() const = 0;
22 virtual const LayerTreeSettings& settings() const = 0; 22 virtual const LayerTreeSettings& settings() const = 0;
23 virtual void didLoseOutputSurface() = 0; 23 virtual void didLoseOutputSurface() = 0;
24 virtual void onSwapBuffersComplete() = 0; 24 virtual void onSwapBuffersComplete() = 0;
25 virtual void setFullRootLayerDamage() = 0; 25 virtual void setFullRootLayerDamage() = 0;
26 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; 26 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
27 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; 27 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
28 virtual bool hasImplThread() const = 0; 28 virtual bool hasImplThread() const = 0;
29 virtual void onReceivedLatencyInfo(const WebKit::WebLatencyInfoImpl&) = 0;
29 protected: 30 protected:
30 virtual ~RendererClient() { } 31 virtual ~RendererClient() { }
31 }; 32 };
32 33
33 class CC_EXPORT Renderer { 34 class CC_EXPORT Renderer {
34 public: 35 public:
35 // This enum defines the various resource pools for the ResourceProvider 36 // This enum defines the various resource pools for the ResourceProvider
36 // where textures get allocated. 37 // where textures get allocated.
37 enum ResourcePool { 38 enum ResourcePool {
38 ImplPool = 1, // This pool is for textures that get allocated on the impl thread (e.g. RenderSurfaces). 39 ImplPool = 1, // This pool is for textures that get allocated on the impl thread (e.g. RenderSurfaces).
(...skipping 26 matching lines...) Expand all
65 virtual void doNoOp() { } 66 virtual void doNoOp() { }
66 // puts backbuffer onscreen 67 // puts backbuffer onscreen
67 virtual bool swapBuffers() = 0; 68 virtual bool swapBuffers() = 0;
68 69
69 virtual void getFramebufferPixels(void *pixels, const gfx::Rect&) = 0; 70 virtual void getFramebufferPixels(void *pixels, const gfx::Rect&) = 0;
70 71
71 virtual bool isContextLost(); 72 virtual bool isContextLost();
72 73
73 virtual void setVisible(bool) = 0; 74 virtual void setVisible(bool) = 0;
74 75
76 virtual void setLatencyInfo(const WebKit::WebLatencyInfoImpl&) = 0;
77
75 virtual void sendManagedMemoryStats(size_t bytesVisible, size_t bytesVisible AndNearby, size_t bytesAllocated) = 0; 78 virtual void sendManagedMemoryStats(size_t bytesVisible, size_t bytesVisible AndNearby, size_t bytesAllocated) = 0;
76 79
77 protected: 80 protected:
78 explicit Renderer(RendererClient* client) 81 explicit Renderer(RendererClient* client)
79 : m_client(client) 82 : m_client(client)
80 { 83 {
81 } 84 }
82 85
83 RendererClient* m_client; 86 RendererClient* m_client;
84 87
85 DISALLOW_COPY_AND_ASSIGN(Renderer); 88 DISALLOW_COPY_AND_ASSIGN(Renderer);
86 }; 89 };
87 90
88 } 91 }
89 92
90 #endif // CC_RENDERER_H_ 93 #endif // CC_RENDERER_H_
OLDNEW
« cc/gl_renderer.h ('K') | « cc/layer_tree_host_unittest.cc ('k') | cc/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698