OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "content/common/gpu/client/context_provider_command_buffer.h" | 5 #include "content/common/gpu/client/context_provider_command_buffer.h" |
6 | 6 |
7 #include "webkit/gpu/grcontext_for_webgraphicscontext3d.h" | 7 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 class ContextProviderCommandBuffer::LostContextCallbackProxy | 11 class ContextProviderCommandBuffer::LostContextCallbackProxy |
12 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { | 12 : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { |
13 public: | 13 public: |
14 explicit LostContextCallbackProxy(ContextProviderCommandBuffer* provider) | 14 explicit LostContextCallbackProxy(ContextProviderCommandBuffer* provider) |
15 : provider_(provider) { | 15 : provider_(provider) { |
16 provider_->context3d_->setContextLostCallback(this); | 16 provider_->context3d_->setContextLostCallback(this); |
17 } | 17 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 return destroyed_; | 121 return destroyed_; |
122 } | 122 } |
123 | 123 |
124 void ContextProviderCommandBuffer::OnMemoryAllocationChanged( | 124 void ContextProviderCommandBuffer::OnMemoryAllocationChanged( |
125 bool nonzero_allocation) { | 125 bool nonzero_allocation) { |
126 if (gr_context_) | 126 if (gr_context_) |
127 gr_context_->SetMemoryLimit(nonzero_allocation); | 127 gr_context_->SetMemoryLimit(nonzero_allocation); |
128 } | 128 } |
129 | 129 |
130 } // namespace content | 130 } // namespace content |
OLD | NEW |