Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: mojo/services/gles2/command_buffer_impl.cc

Issue 668663006: Standardize usage of virtual/override/final in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/services/gles2/command_buffer_impl.h ('k') | mojo/services/gles2/mojo_buffer_backing.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "mojo/services/gles2/command_buffer_impl.h" 5 #include "mojo/services/gles2/command_buffer_impl.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 "gpu/command_buffer/common/constants.h" 10 #include "gpu/command_buffer/common/constants.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/gl/gl_surface.h" 21 #include "ui/gl/gl_surface.h"
22 22
23 namespace mojo { 23 namespace mojo {
24 24
25 namespace { 25 namespace {
26 26
27 class MemoryTrackerStub : public gpu::gles2::MemoryTracker { 27 class MemoryTrackerStub : public gpu::gles2::MemoryTracker {
28 public: 28 public:
29 MemoryTrackerStub() {} 29 MemoryTrackerStub() {}
30 30
31 virtual void TrackMemoryAllocatedChange(size_t old_size, 31 void TrackMemoryAllocatedChange(
32 size_t new_size, 32 size_t old_size,
33 gpu::gles2::MemoryTracker::Pool pool) 33 size_t new_size,
34 override {} 34 gpu::gles2::MemoryTracker::Pool pool) override {}
35 35
36 virtual bool EnsureGPUMemoryAvailable(size_t size_needed) override { 36 bool EnsureGPUMemoryAvailable(size_t size_needed) override { return true; };
37 return true;
38 };
39 37
40 private: 38 private:
41 virtual ~MemoryTrackerStub() {} 39 ~MemoryTrackerStub() override {}
42 40
43 DISALLOW_COPY_AND_ASSIGN(MemoryTrackerStub); 41 DISALLOW_COPY_AND_ASSIGN(MemoryTrackerStub);
44 }; 42 };
45 43
46 } // anonymous namespace 44 } // anonymous namespace
47 45
48 CommandBufferImpl::CommandBufferImpl( 46 CommandBufferImpl::CommandBufferImpl(
49 gfx::GLShareGroup* share_group, 47 gfx::GLShareGroup* share_group,
50 gpu::gles2::MailboxManager* mailbox_manager) 48 gpu::gles2::MailboxManager* mailbox_manager)
51 : widget_(gfx::kNullAcceleratedWidget), 49 : widget_(gfx::kNullAcceleratedWidget),
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void CommandBufferImpl::OnParseError() { 193 void CommandBufferImpl::OnParseError() {
196 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 194 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
197 client()->LostContext(state.context_lost_reason); 195 client()->LostContext(state.context_lost_reason);
198 } 196 }
199 197
200 void CommandBufferImpl::OnResize(gfx::Size size, float scale_factor) { 198 void CommandBufferImpl::OnResize(gfx::Size size, float scale_factor) {
201 surface_->Resize(size); 199 surface_->Resize(size);
202 } 200 }
203 201
204 } // namespace mojo 202 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/gles2/command_buffer_impl.h ('k') | mojo/services/gles2/mojo_buffer_backing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698