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

Side by Side Diff: content/common/gpu/gpu_memory_buffer_factory.h

Issue 701033005: content: Move type selection logic out of GpuMemoryBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review feedback Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h"
10 #include "ui/gfx/geometry/size.h" 11 #include "ui/gfx/geometry/size.h"
11 #include "ui/gfx/gpu_memory_buffer.h" 12 #include "ui/gfx/gpu_memory_buffer.h"
12 13
13 namespace gfx { 14 namespace gfx {
14 class GLImage; 15 class GLImage;
15 } 16 }
16 17
17 namespace gpu { 18 namespace gpu {
18 class ImageFactory; 19 class ImageFactory;
19 } 20 }
20 21
21 namespace content { 22 namespace content {
22 23
23 class GpuMemoryBufferFactory { 24 class CONTENT_EXPORT GpuMemoryBufferFactory {
24 public: 25 public:
25 GpuMemoryBufferFactory() {} 26 GpuMemoryBufferFactory() {}
26 virtual ~GpuMemoryBufferFactory() {} 27 virtual ~GpuMemoryBufferFactory() {}
27 28
28 // Creates a new platform specific factory instance. 29 // Creates a new platform specific factory instance.
29 static scoped_ptr<GpuMemoryBufferFactory> Create(); 30 static scoped_ptr<GpuMemoryBufferFactory> Create();
30 31
31 // Creates a GPU memory buffer instance of |type|. A valid handle is 32 // Creates a GPU memory buffer instance of |type|. A valid handle is
32 // returned on success. 33 // returned on success.
33 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( 34 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
(...skipping 12 matching lines...) Expand all
46 // Type-checking downcast routine. 47 // Type-checking downcast routine.
47 virtual gpu::ImageFactory* AsImageFactory() = 0; 48 virtual gpu::ImageFactory* AsImageFactory() = 0;
48 49
49 private: 50 private:
50 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory); 51 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
51 }; 52 };
52 53
53 } // namespace content 54 } // namespace content
54 55
55 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 56 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_win.cc ('k') | content/common/gpu/gpu_memory_buffer_factory_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698