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 8f4e84a0f092e32e70e6385c50471eb5f4bd7c9b..dbebb46a847aca903eaba94e75e390573b0ea1cc 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.h |
+++ b/content/common/gpu/gpu_command_buffer_stub.h |
@@ -33,6 +33,7 @@ |
class GpuChannel; |
class GpuWatchdog; |
+class GpuMemoryAllocation; |
class GpuCommandBufferStub |
: public IPC::Channel::Listener, |
@@ -73,6 +74,15 @@ class GpuCommandBufferStub |
gpu::gles2::GLES2Decoder* decoder() const { return decoder_.get(); } |
gpu::GpuScheduler* scheduler() const { return scheduler_.get(); } |
+ // visibility state of associated render widgets. |
nduca
2012/01/27 10:10:13
Visibility, upper cap
|
+ // Note: This is only valid once last_used_time is != kUnknownLastUsedTime |
+ bool visible() const { return visible_; } |
nduca
2012/01/27 10:10:13
Please make a visibility_known accessor and update
|
+ |
+ // last_used_time is updated during visibility changes, and can be used for |
nduca
2012/01/27 10:10:13
// Comments are sentences and thus the first word
|
+ // LRU ordering in combination with visibility state |
nduca
2012/01/27 10:10:13
Not sure the lru comment is useful here.
Why are
mmocny
2012/01/27 19:51:33
For no good reason whatsoever. Changed, thanks.
O
|
+ static const int64 kUnknownLastUsedTime = 0; |
+ int64 last_used_time() const { return last_used_time_; } |
+ |
// Identifies the target surface. |
int32 surface_id() const { return surface_id_; } |
@@ -80,11 +90,16 @@ class GpuCommandBufferStub |
// to the same renderer process. |
int32 route_id() const { return route_id_; } |
+ // Return the ids of RenderWidgets which have identified as using this stub |
+ std::vector<int> render_widget_ids() const; |
nduca
2012/01/27 10:10:13
Consistency!
affected_render_widget_ids.
Then yo
|
+ |
gfx::GpuPreference gpu_preference() { return gpu_preference_; } |
// Sends a message to the console. |
void SendConsoleMessage(int32 id, const std::string& message); |
+ void SetMemoryAllocation(GpuMemoryAllocation const& allocation); |
nduca
2012/01/27 10:10:13
This sends not sets, right? Call things by what th
|
+ |
private: |
void Destroy(); |
@@ -141,6 +156,8 @@ class GpuCommandBufferStub |
int32 route_id_; |
bool software_; |
uint32 last_flush_count_; |
+ bool visible_; |
+ int64 last_used_time_; |
// Identifies the window for the rendering results on the browser side. |
int32 surface_id_; |