| Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| index 30982bb0a2b193ee006d17cfb5a976b8f1e2071a..bc42f937a379b0bb2413c8eb02ab6c499c5c4ec5 100644
|
| --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| @@ -133,6 +133,7 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
|
| context_lost_reason_(GL_NO_ERROR),
|
| error_message_callback_(0),
|
| swapbuffers_complete_callback_(0),
|
| + latency_info_callback_(0),
|
| gpu_preference_(gfx::PreferIntegratedGpu),
|
| cached_width_(0),
|
| cached_height_(0),
|
| @@ -235,6 +236,10 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL(
|
| base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnErrorMessage,
|
| weak_ptr_factory_.GetWeakPtr()));
|
|
|
| + command_buffer_->SetLatencyInfoCallback(
|
| + base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnSetLatencyInfo,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| +
|
| client_error_message_callback_.reset(
|
| new WebGraphicsContext3DErrorMessageCallback(this));
|
| gl_->SetErrorMessageCallback(client_error_message_callback_.get());
|
| @@ -551,6 +556,24 @@ void WebGraphicsContext3DCommandBufferImpl::postSubBufferCHROMIUM(
|
| weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| +void WebGraphicsContext3DCommandBufferImpl::setLatencyInfoCHROMIUM(
|
| + const WebKit::WebLatencyInfo& latency_info) {
|
| + command_buffer_->SetLatencyInfo(
|
| + static_cast<const WebKit::WebLatencyInfoImpl&>(latency_info));
|
| +}
|
| +
|
| +void WebGraphicsContext3DCommandBufferImpl::setLatencyInfoCallbackCHROMIUM(
|
| + WebGraphicsContext3D::WebGraphicsLatencyInfoCallbackCHROMIUM* cb) {
|
| + latency_info_callback_ = cb;
|
| +}
|
| +
|
| +void WebGraphicsContext3DCommandBufferImpl::OnSetLatencyInfo(
|
| + const WebKit::WebLatencyInfoImpl& latency_info) {
|
| + if (latency_info_callback_)
|
| + latency_info_callback_->onReceivedLatencyInfo(
|
| + static_cast<const WebKit::WebLatencyInfo&>(latency_info));
|
| +}
|
| +
|
| void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) {
|
| cached_width_ = width;
|
| cached_height_ = height;
|
|
|