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

Side by Side Diff: cc/CCProxy.h

Issue 10916292: Adaptively throttle texture uploads (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add tests. Created 8 years, 3 months 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
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 "IntRect.h" 8 #include "IntRect.h"
9 #include <public/WebCompositorOutputSurface.h> 9 #include <public/WebCompositorOutputSurface.h>
10 #include <wtf/Noncopyable.h> 10 #include <wtf/Noncopyable.h>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 virtual void setVisible(bool) = 0; 52 virtual void setVisible(bool) = 0;
53 53
54 // Attempts to initialize the layer renderer. Returns false if the context i sn't usable for compositing. 54 // Attempts to initialize the layer renderer. Returns false if the context i sn't usable for compositing.
55 virtual bool initializeRenderer() = 0; 55 virtual bool initializeRenderer() = 0;
56 56
57 // Attempts to recreate the context and layer renderer after a context lost. Returns false if the renderer couldn't be 57 // Attempts to recreate the context and layer renderer after a context lost. Returns false if the renderer couldn't be
58 // reinitialized. 58 // reinitialized.
59 virtual bool recreateContext() = 0; 59 virtual bool recreateContext() = 0;
60 60
61 virtual void implSideRenderingStats(CCRenderingStats&) = 0; 61 virtual void renderingStats(CCRenderingStats&) = 0;
62 62
63 virtual const RendererCapabilities& rendererCapabilities() const = 0; 63 virtual const RendererCapabilities& rendererCapabilities() const = 0;
64 64
65 virtual void setNeedsAnimate() = 0; 65 virtual void setNeedsAnimate() = 0;
66 virtual void setNeedsCommit() = 0; 66 virtual void setNeedsCommit() = 0;
67 virtual void setNeedsRedraw() = 0; 67 virtual void setNeedsRedraw() = 0;
68 68
69 virtual void didAddAnimation() = 0; 69 virtual void didAddAnimation() = 0;
70 70
71 virtual bool commitRequested() const = 0; 71 virtual bool commitRequested() const = 0;
72 72
73 virtual void start() = 0; // Must be called before using the proxy. 73 virtual void start() = 0; // Must be called before using the proxy.
74 virtual void stop() = 0; // Must be called before deleting the proxy. 74 virtual void stop() = 0; // Must be called before deleting the proxy.
75 75
76 // Forces 3D commands on all contexts to wait for all previous SwapBuffers t o finish before executing in the GPU 76 // Forces 3D commands on all contexts to wait for all previous SwapBuffers t o finish before executing in the GPU
77 // process. 77 // process.
78 virtual void forceSerializeOnSwapBuffers() = 0; 78 virtual void forceSerializeOnSwapBuffers() = 0;
79 79
80 // Maximum number of sub-region texture updates supported for each commit.
81 virtual size_t maxPartialTextureUpdates() const = 0;
82
83 virtual void acquireLayerTextures() = 0; 80 virtual void acquireLayerTextures() = 0;
84 81
85 // Debug hooks 82 // Debug hooks
86 #ifndef NDEBUG 83 #ifndef NDEBUG
87 static bool isMainThread(); 84 static bool isMainThread();
88 static bool isImplThread(); 85 static bool isImplThread();
89 static bool isMainThreadBlocked(); 86 static bool isMainThreadBlocked();
90 static void setMainThreadBlocked(bool); 87 static void setMainThreadBlocked(bool);
91 #endif 88 #endif
92 89
(...skipping 24 matching lines...) Expand all
117 #if !ASSERT_DISABLED 114 #if !ASSERT_DISABLED
118 ASSERT(CCProxy::isMainThreadBlocked()); 115 ASSERT(CCProxy::isMainThreadBlocked());
119 CCProxy::setMainThreadBlocked(false); 116 CCProxy::setMainThreadBlocked(false);
120 #endif 117 #endif
121 } 118 }
122 }; 119 };
123 120
124 } 121 }
125 122
126 #endif 123 #endif
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHost.cpp ('k') | cc/CCRenderingStats.h » ('j') | cc/CCTextureUpdateController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698