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

Side by Side Diff: gpu/command_buffer/service/gpu_processor.h

Issue 6076005: Mac: Don't hang gpu process on popup close under certain conditions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: final touches Created 9 years, 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/surface/transport_dib.h" 10 #include "app/surface/transport_dib.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual uint64 GetSurfaceId(); 90 virtual uint64 GetSurfaceId();
91 // To prevent the GPU process from overloading the browser process, 91 // To prevent the GPU process from overloading the browser process,
92 // we need to track the number of swap buffers calls issued and 92 // we need to track the number of swap buffers calls issued and
93 // acknowledged per on-screen (IOSurface-backed) context, and keep 93 // acknowledged per on-screen (IOSurface-backed) context, and keep
94 // the GPU from getting too far ahead of the browser. Note that this 94 // the GPU from getting too far ahead of the browser. Note that this
95 // is also predicated on a flow control mechanism between the 95 // is also predicated on a flow control mechanism between the
96 // renderer and GPU processes. 96 // renderer and GPU processes.
97 uint64 swap_buffers_count() const; 97 uint64 swap_buffers_count() const;
98 void set_acknowledged_swap_buffers_count( 98 void set_acknowledged_swap_buffers_count(
99 uint64 acknowledged_swap_buffers_count); 99 uint64 acknowledged_swap_buffers_count);
100
101 void DidDestroySurface();
100 #endif 102 #endif
101 103
102 // Sets a callback that is called when a glResizeCHROMIUM command 104 // Sets a callback that is called when a glResizeCHROMIUM command
103 // is processed. 105 // is processed.
104 virtual void SetResizeCallback(Callback1<gfx::Size>::Type* callback); 106 virtual void SetResizeCallback(Callback1<gfx::Size>::Type* callback);
105 107
106 // Sets a callback which is called when a SwapBuffers command is processed. 108 // Sets a callback which is called when a SwapBuffers command is processed.
107 // Must be called after Initialize(). 109 // Must be called after Initialize().
108 // It is not defined on which thread this callback is called. 110 // It is not defined on which thread this callback is called.
109 virtual void SetSwapBuffersCallback(Callback0::Type* callback); 111 virtual void SetSwapBuffersCallback(Callback0::Type* callback);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 uint64 acknowledged_swap_buffers_count_; 144 uint64 acknowledged_swap_buffers_count_;
143 #endif 145 #endif
144 146
145 ScopedRunnableMethodFactory<GPUProcessor> method_factory_; 147 ScopedRunnableMethodFactory<GPUProcessor> method_factory_;
146 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; 148 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_;
147 }; 149 };
148 150
149 } // namespace gpu 151 } // namespace gpu
150 152
151 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ 153 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698