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

Side by Side Diff: cc/output/output_surface.h

Issue 640023004: cc: Make OutputSurface::SwapBuffers pure virtual (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@latinfo
Patch Set: and rebase Created 6 years, 2 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
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | mojo/cc/direct_output_surface.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_OUTPUT_OUTPUT_SURFACE_H_ 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 virtual void EnsureBackbuffer(); 106 virtual void EnsureBackbuffer();
107 virtual void DiscardBackbuffer(); 107 virtual void DiscardBackbuffer();
108 108
109 virtual void Reshape(const gfx::Size& size, float scale_factor); 109 virtual void Reshape(const gfx::Size& size, float scale_factor);
110 virtual gfx::Size SurfaceSize() const; 110 virtual gfx::Size SurfaceSize() const;
111 111
112 virtual void BindFramebuffer(); 112 virtual void BindFramebuffer();
113 113
114 // The implementation may destroy or steal the contents of the CompositorFrame 114 // The implementation may destroy or steal the contents of the CompositorFrame
115 // passed in (though it will not take ownership of the CompositorFrame 115 // passed in (though it will not take ownership of the CompositorFrame
116 // itself). 116 // itself). For successful swaps, the implementation must call
117 virtual void SwapBuffers(CompositorFrame* frame); 117 // OutputSurfaceClient::DidSwapBuffers() and eventually
118 // DidSwapBuffersComplete().
119 virtual void SwapBuffers(CompositorFrame* frame) = 0;
118 virtual void OnSwapBuffersComplete(); 120 virtual void OnSwapBuffersComplete();
119 121
120 // Notifies frame-rate smoothness preference. If true, all non-critical 122 // Notifies frame-rate smoothness preference. If true, all non-critical
121 // processing should be stopped, or lowered in priority. 123 // processing should be stopped, or lowered in priority.
122 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {} 124 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {}
123 125
124 // Requests a BeginFrame notification from the output surface. The 126 // Requests a BeginFrame notification from the output surface. The
125 // notification will be delivered by calling 127 // notification will be delivered by calling
126 // OutputSurfaceClient::BeginFrame until the callback is disabled. 128 // OutputSurfaceClient::BeginFrame until the callback is disabled.
127 virtual void SetNeedsBeginFrame(bool enable) {} 129 virtual void SetNeedsBeginFrame(bool enable) {}
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 bool external_stencil_test_enabled_; 177 bool external_stencil_test_enabled_;
176 178
177 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; 179 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
178 180
179 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 181 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
180 }; 182 };
181 183
182 } // namespace cc 184 } // namespace cc
183 185
184 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 186 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | mojo/cc/direct_output_surface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698