OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "components/view_manager/gles2/command_buffer_driver.h" | 5 #include "components/view_manager/gles2/command_buffer_driver.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "components/view_manager/gles2/command_buffer_type_conversions.h" | 10 #include "components/view_manager/gles2/command_buffer_type_conversions.h" |
(...skipping 26 matching lines...) Expand all Loading... | |
37 class MemoryTrackerStub : public gpu::gles2::MemoryTracker { | 37 class MemoryTrackerStub : public gpu::gles2::MemoryTracker { |
38 public: | 38 public: |
39 MemoryTrackerStub() {} | 39 MemoryTrackerStub() {} |
40 | 40 |
41 void TrackMemoryAllocatedChange( | 41 void TrackMemoryAllocatedChange( |
42 size_t old_size, | 42 size_t old_size, |
43 size_t new_size, | 43 size_t new_size, |
44 gpu::gles2::MemoryTracker::Pool pool) override {} | 44 gpu::gles2::MemoryTracker::Pool pool) override {} |
45 | 45 |
46 bool EnsureGPUMemoryAvailable(size_t size_needed) override { return true; }; | 46 bool EnsureGPUMemoryAvailable(size_t size_needed) override { return true; }; |
47 | 47 |
jam
2015/08/04 15:18:06
nit: no blank line since these are all overridden
ericrk
2015/08/04 19:06:00
Done.
| |
48 uint64_t ClientTracingId() const override { return 0; } | |
49 int ClientId() const override { return 0; } | |
50 | |
48 private: | 51 private: |
49 ~MemoryTrackerStub() override {} | 52 ~MemoryTrackerStub() override {} |
50 | 53 |
51 DISALLOW_COPY_AND_ASSIGN(MemoryTrackerStub); | 54 DISALLOW_COPY_AND_ASSIGN(MemoryTrackerStub); |
52 }; | 55 }; |
53 | 56 |
54 } // anonymous namespace | 57 } // anonymous namespace |
55 | 58 |
56 CommandBufferDriver::Client::~Client() { | 59 CommandBufferDriver::Client::~Client() { |
57 } | 60 } |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 | 357 |
355 void CommandBufferDriver::DestroyDecoder() { | 358 void CommandBufferDriver::DestroyDecoder() { |
356 if (decoder_) { | 359 if (decoder_) { |
357 bool have_context = decoder_->MakeCurrent(); | 360 bool have_context = decoder_->MakeCurrent(); |
358 decoder_->Destroy(have_context); | 361 decoder_->Destroy(have_context); |
359 decoder_.reset(); | 362 decoder_.reset(); |
360 } | 363 } |
361 } | 364 } |
362 | 365 |
363 } // namespace gles2 | 366 } // namespace gles2 |
OLD | NEW |