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

Side by Side Diff: services/ui/common/gpu_memory_buffer_impl.cc

Issue 2184943002: services/ui: Move some files into the client lib. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-gpu-in-mus-windows
Patch Set: . Created 4 years, 4 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 | « services/ui/common/gpu_memory_buffer_impl.h ('k') | services/ui/common/gpu_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "services/ui/common/gpu_memory_buffer_impl.h"
6
7 namespace ui {
8
9 GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
10 const gfx::Size& size,
11 gfx::BufferFormat format)
12 : id_(id), size_(size), format_(format), mapped_(false) {}
13
14 GpuMemoryBufferImpl::~GpuMemoryBufferImpl() {
15 DCHECK(!mapped_);
16 }
17
18 // static
19 GpuMemoryBufferImpl* GpuMemoryBufferImpl::FromClientBuffer(
20 ClientBuffer buffer) {
21 return reinterpret_cast<GpuMemoryBufferImpl*>(buffer);
22 }
23
24 gfx::Size GpuMemoryBufferImpl::GetSize() const {
25 return size_;
26 }
27
28 gfx::BufferFormat GpuMemoryBufferImpl::GetFormat() const {
29 return format_;
30 }
31
32 gfx::GpuMemoryBufferId GpuMemoryBufferImpl::GetId() const {
33 return id_;
34 }
35
36 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() {
37 return reinterpret_cast<ClientBuffer>(this);
38 }
39
40 #if defined(USE_OZONE)
41 scoped_refptr<ui::NativePixmap> GpuMemoryBufferImpl::GetNativePixmap() {
42 return scoped_refptr<ui::NativePixmap>();
43 }
44 #endif
45
46 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/common/gpu_memory_buffer_impl.h ('k') | services/ui/common/gpu_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698