| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 void GpuCommandBufferStub::AddDestructionObserver( | 615 void GpuCommandBufferStub::AddDestructionObserver( |
| 616 DestructionObserver* observer) { | 616 DestructionObserver* observer) { |
| 617 destruction_observers_.AddObserver(observer); | 617 destruction_observers_.AddObserver(observer); |
| 618 } | 618 } |
| 619 | 619 |
| 620 void GpuCommandBufferStub::RemoveDestructionObserver( | 620 void GpuCommandBufferStub::RemoveDestructionObserver( |
| 621 DestructionObserver* observer) { | 621 DestructionObserver* observer) { |
| 622 destruction_observers_.RemoveObserver(observer); | 622 destruction_observers_.RemoveObserver(observer); |
| 623 } | 623 } |
| 624 | 624 |
| 625 gfx::Size GpuCommandBufferStub::GetSurfaceSize() const { |
| 626 if (!surface_) |
| 627 return gfx::Size(); |
| 628 return surface_->GetSize(); |
| 629 } |
| 630 |
| 625 bool GpuCommandBufferStub::IsInSameContextShareGroup( | 631 bool GpuCommandBufferStub::IsInSameContextShareGroup( |
| 626 const GpuCommandBufferStubBase& other) const { | 632 const GpuCommandBufferStubBase& other) const { |
| 627 return context_group_ == | 633 return context_group_ == |
| 628 static_cast<const GpuCommandBufferStub&>(other).context_group_; | 634 static_cast<const GpuCommandBufferStub&>(other).context_group_; |
| 629 } | 635 } |
| 630 | 636 |
| 631 bool GpuCommandBufferStub:: | 637 bool GpuCommandBufferStub:: |
| 632 client_has_memory_allocation_changed_callback() const { | 638 client_has_memory_allocation_changed_callback() const { |
| 633 return client_has_memory_allocation_changed_callback_; | 639 return client_has_memory_allocation_changed_callback_; |
| 634 } | 640 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 649 } | 655 } |
| 650 | 656 |
| 651 void GpuCommandBufferStub::SetMemoryAllocation( | 657 void GpuCommandBufferStub::SetMemoryAllocation( |
| 652 const GpuMemoryAllocation& allocation) { | 658 const GpuMemoryAllocation& allocation) { |
| 653 allocation_ = allocation; | 659 allocation_ = allocation; |
| 654 | 660 |
| 655 SendMemoryAllocationToProxy(allocation); | 661 SendMemoryAllocationToProxy(allocation); |
| 656 } | 662 } |
| 657 | 663 |
| 658 #endif // defined(ENABLE_GPU) | 664 #endif // defined(ENABLE_GPU) |
| OLD | NEW |