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

Side by Side Diff: content/test/test_native_pixmap_manager_ozone.h

Issue 1134993003: ozone: Implement zero/one-copy texture for Ozone GBM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to new crrev.com/1128113011 Created 5 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_TEST_TEST_NATIVE_PIXMAP_MANAGER_OZONE_H_ 5 #ifndef CONTENT_TEST_TEST_NATIVE_PIXMAP_MANAGER_OZONE_H_
6 #define CONTENT_TEST_TEST_NATIVE_PIXMAP_MANAGER_OZONE_H_ 6 #define CONTENT_TEST_TEST_NATIVE_PIXMAP_MANAGER_OZONE_H_
7 7
8 #include "base/file_descriptor_posix.h" 8 #include "base/file_descriptor_posix.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "ui/ozone/public/native_pixmap_manager.h" 11 #include "ui/ozone/public/native_pixmap_manager.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class TestNativePixmapManager : public ui::NativePixmapManager { 15 class TestNativePixmapManager : public ui::NativePixmapManager {
16 public: 16 public:
17 static TestNativePixmapManager* GetInstance(); 17 static TestNativePixmapManager* GetInstance();
18 18
19 ~TestNativePixmapManager() override; 19 ~TestNativePixmapManager() override;
20 20
21 // ui::NativePixmapManager: 21 // ui::NativePixmapManager:
22 void Initialize(const base::FileDescriptor& device_fd) override; 22 void Initialize(const base::FileDescriptor& device_fd) override;
23 std::vector<Configuration> GetSupportedNativePixmapConfigurations() 23 std::vector<Configuration> GetSupportedNativePixmapConfigurations()
24 const override; 24 const override;
25 virtual scoped_refptr<ui::NativePixmap> CreateFromFileDescriptor(
26 base::FileDescriptor handle,
27 gfx::Size size,
28 ui::SurfaceFactoryOzone::BufferFormat format,
29 ui::SurfaceFactoryOzone::BufferUsage usage) override;
25 30
26 private: 31 private:
27 friend struct TestNativePixmapManagerTrait; 32 friend struct TestNativePixmapManagerTrait;
28 TestNativePixmapManager(); 33 TestNativePixmapManager();
29 34
30 scoped_ptr<ui::NativePixmapManager> pixmap_manager_; 35 scoped_ptr<ui::NativePixmapManager> pixmap_manager_;
31 base::FileDescriptor device_fd_; 36 base::FileDescriptor device_fd_;
32 37
33 DISALLOW_COPY_AND_ASSIGN(TestNativePixmapManager); 38 DISALLOW_COPY_AND_ASSIGN(TestNativePixmapManager);
34 }; 39 };
35 40
36 } // namespace content 41 } // namespace content
37 42
38 #endif // CONTENT_TEST_TEST_NATIVE_PIXMAP_MANAGER_OZONE_H_ 43 #endif // CONTENT_TEST_TEST_NATIVE_PIXMAP_MANAGER_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698