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

Side by Side Diff: cc/trees/proxy.h

Issue 85693007: cc: Defer first OutputSurface creation until client is ready (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 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 CC_TREES_PROXY_H_ 5 #ifndef CC_TREES_PROXY_H_
6 #define CC_TREES_PROXY_H_ 6 #define CC_TREES_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual ~Proxy(); 47 virtual ~Proxy();
48 48
49 virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) = 0; 49 virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) = 0;
50 50
51 virtual void FinishAllRendering() = 0; 51 virtual void FinishAllRendering() = 0;
52 52
53 virtual bool IsStarted() const = 0; 53 virtual bool IsStarted() const = 0;
54 54
55 // Indicates that the compositing surface associated with our context is 55 // Indicates that the compositing surface associated with our context is
56 // ready to use. 56 // ready to use.
57 virtual void SetLayerTreeHostClientReady() = 0; 57 virtual void SetLayerTreeHostClientReady(
58 scoped_ptr<OutputSurface> first_output_surface) = 0;
58 59
59 virtual void SetVisible(bool visible) = 0; 60 virtual void SetVisible(bool visible) = 0;
60 61
61 // Attempts to recreate the context and renderer synchronously after the 62 // Attempts to recreate the context and renderer synchronously after the
62 // output surface is lost. Calls 63 // output surface is lost. Calls
63 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. 64 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result.
64 virtual void CreateAndInitializeOutputSurface() = 0; 65 virtual void CreateAndInitializeOutputSurface() = 0;
65 66
66 virtual const RendererCapabilities& GetRendererCapabilities() const = 0; 67 virtual const RendererCapabilities& GetRendererCapabilities() const = 0;
67 68
68 virtual void SetNeedsAnimate() = 0; 69 virtual void SetNeedsAnimate() = 0;
69 virtual void SetNeedsUpdateLayers() = 0; 70 virtual void SetNeedsUpdateLayers() = 0;
70 virtual void SetNeedsCommit() = 0; 71 virtual void SetNeedsCommit() = 0;
71 virtual void SetNeedsRedraw(gfx::Rect damage_rect) = 0; 72 virtual void SetNeedsRedraw(gfx::Rect damage_rect) = 0;
72 virtual void SetNextCommitWaitsForActivation() = 0; 73 virtual void SetNextCommitWaitsForActivation() = 0;
73 74
74 virtual void NotifyInputThrottledUntilCommit() = 0; 75 virtual void NotifyInputThrottledUntilCommit() = 0;
75 76
76 // Defers commits until it is reset. It is only supported when in threaded 77 // Defers commits until it is reset. It is only supported when in threaded
77 // mode. It's an error to make a sync call like CompositeAndReadback while 78 // mode. It's an error to make a sync call like CompositeAndReadback while
78 // commits are deferred. 79 // commits are deferred.
79 virtual void SetDeferCommits(bool defer_commits) = 0; 80 virtual void SetDeferCommits(bool defer_commits) = 0;
80 81
81 virtual void MainThreadHasStoppedFlinging() = 0; 82 virtual void MainThreadHasStoppedFlinging() = 0;
82 83
83 virtual bool CommitRequested() const = 0; 84 virtual bool CommitRequested() const = 0;
84 virtual bool BeginMainFrameRequested() const = 0; 85 virtual bool BeginMainFrameRequested() const = 0;
85 86
86 // Must be called before using the proxy. 87 // Must be called before using the proxy.
87 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) = 0; 88 virtual void Start() = 0;
88 virtual void Stop() = 0; // Must be called before deleting the proxy. 89 virtual void Stop() = 0; // Must be called before deleting the proxy.
89 90
90 // Forces 3D commands on all contexts to wait for all previous SwapBuffers 91 // Forces 3D commands on all contexts to wait for all previous SwapBuffers
91 // to finish before executing in the GPU process. 92 // to finish before executing in the GPU process.
92 virtual void ForceSerializeOnSwapBuffers() = 0; 93 virtual void ForceSerializeOnSwapBuffers() = 0;
93 94
94 // Maximum number of sub-region texture updates supported for each commit. 95 // Maximum number of sub-region texture updates supported for each commit.
95 virtual size_t MaxPartialTextureUpdates() const = 0; 96 virtual size_t MaxPartialTextureUpdates() const = 0;
96 97
97 virtual void AcquireLayerTextures() = 0; 98 virtual void AcquireLayerTextures() = 0;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} 142 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {}
142 ~DebugScopedSetMainThreadBlocked() {} 143 ~DebugScopedSetMainThreadBlocked() {}
143 private: 144 private:
144 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); 145 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked);
145 }; 146 };
146 #endif 147 #endif
147 148
148 } // namespace cc 149 } // namespace cc
149 150
150 #endif // CC_TREES_PROXY_H_ 151 #endif // CC_TREES_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698