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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 11187010: Rename SurfaceState to MemoryManagerState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix trybot warnings Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.h
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index 75ac792b19c5d958089c8e1bde8ab6be0c665030..98703d187e602e23732fae3f0348337cf87ba1f8 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -48,23 +48,25 @@ class MailboxManager;
// testability.
class CONTENT_EXPORT GpuCommandBufferStubBase {
public:
- struct CONTENT_EXPORT SurfaceState {
- int32 surface_id;
+ struct CONTENT_EXPORT MemoryManagerState {
+ // Offscreen commandbuffers will not have a surface.
+ bool has_surface;
bool visible;
+ bool client_has_memory_allocation_changed_callback;
+ // The last used time is determined by the last time that visibility
+ // was changed.
base::TimeTicks last_used_time;
- SurfaceState(int32 surface_id,
- bool visible,
- base::TimeTicks last_used_time);
+ MemoryManagerState(
+ bool has_surface,
+ bool visible,
+ base::TimeTicks last_used_time);
};
public:
virtual ~GpuCommandBufferStubBase() {}
- // Will not have surface state if this is an offscreen commandbuffer.
- virtual bool client_has_memory_allocation_changed_callback() const = 0;
- virtual bool has_surface_state() const = 0;
- virtual const SurfaceState& surface_state() const = 0;
+ virtual const MemoryManagerState& memory_manager_state() const = 0;
virtual gfx::Size GetSurfaceSize() const = 0;
@@ -117,10 +119,8 @@ class GpuCommandBufferStub
virtual bool Send(IPC::Message* msg) OVERRIDE;
// GpuCommandBufferStubBase implementation:
- virtual bool client_has_memory_allocation_changed_callback() const OVERRIDE;
- virtual bool has_surface_state() const OVERRIDE;
- virtual const GpuCommandBufferStubBase::SurfaceState& surface_state() const
- OVERRIDE;
+ virtual const GpuCommandBufferStubBase::MemoryManagerState&
+ memory_manager_state() const OVERRIDE;
// Returns surface size.
virtual gfx::Size GetSurfaceSize() const OVERRIDE;
@@ -153,7 +153,7 @@ class GpuCommandBufferStub
// Identifies the target surface.
int32 surface_id() const {
- return (surface_state_.get()) ? surface_state_->surface_id : 0;
+ return surface_id_;
}
// Identifies the various GpuCommandBufferStubs in the GPU process belonging
@@ -256,10 +256,10 @@ class GpuCommandBufferStub
std::vector<int32> requested_attribs_;
gfx::GpuPreference gpu_preference_;
int32 route_id_;
+ int32 surface_id_;
bool software_;
- bool client_has_memory_allocation_changed_callback_;
uint32 last_flush_count_;
- scoped_ptr<GpuCommandBufferStubBase::SurfaceState> surface_state_;
+ scoped_ptr<MemoryManagerState> memory_manager_state_;
scoped_ptr<gpu::CommandBufferService> command_buffer_;
scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698