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

Side by Side Diff: ui/ozone/platform/drm/test/mock_drm_device.h

Issue 1132803004: ozone: drm: Fix graphics buffer handle leak in DrmConsoleBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
Patch Set: Created 5 years, 7 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 | « ui/ozone/platform/drm/gpu/drm_device.cc ('k') | ui/ozone/platform/drm/test/mock_drm_device.cc » ('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 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 UI_OZONE_PLATFORM_DRM_TEST_MOCK_DRM_DEVICE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_TEST_MOCK_DRM_DEVICE_H_
6 #define UI_OZONE_PLATFORM_DRM_TEST_MOCK_DRM_DEVICE_H_ 6 #define UI_OZONE_PLATFORM_DRM_TEST_MOCK_DRM_DEVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <vector> 10 #include <vector>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const gfx::Size& size) override; 99 const gfx::Size& size) override;
100 bool MoveCursor(uint32_t crtc_id, const gfx::Point& point) override; 100 bool MoveCursor(uint32_t crtc_id, const gfx::Point& point) override;
101 bool CreateDumbBuffer(const SkImageInfo& info, 101 bool CreateDumbBuffer(const SkImageInfo& info,
102 uint32_t* handle, 102 uint32_t* handle,
103 uint32_t* stride, 103 uint32_t* stride,
104 void** pixels) override; 104 void** pixels) override;
105 void DestroyDumbBuffer(const SkImageInfo& info, 105 void DestroyDumbBuffer(const SkImageInfo& info,
106 uint32_t handle, 106 uint32_t handle,
107 uint32_t stride, 107 uint32_t stride,
108 void* pixels) override; 108 void* pixels) override;
109
110 bool CloseBufferHandle(uint32_t handle) override;
109 bool CommitProperties(drmModePropertySet* properties, 111 bool CommitProperties(drmModePropertySet* properties,
110 uint32_t flags, 112 uint32_t flags,
111 const PageFlipCallback& callback) override; 113 const PageFlipCallback& callback) override;
112 114
113 private: 115 private:
114 ~MockDrmDevice() override; 116 ~MockDrmDevice() override;
115 117
116 int get_crtc_call_count_; 118 int get_crtc_call_count_;
117 int set_crtc_call_count_; 119 int set_crtc_call_count_;
118 int restore_crtc_call_count_; 120 int restore_crtc_call_count_;
(...skipping 18 matching lines...) Expand all
137 std::map<uint32_t, uint32_t> crtc_cursor_map_; 139 std::map<uint32_t, uint32_t> crtc_cursor_map_;
138 140
139 std::queue<PageFlipCallback> callbacks_; 141 std::queue<PageFlipCallback> callbacks_;
140 142
141 DISALLOW_COPY_AND_ASSIGN(MockDrmDevice); 143 DISALLOW_COPY_AND_ASSIGN(MockDrmDevice);
142 }; 144 };
143 145
144 } // namespace ui 146 } // namespace ui
145 147
146 #endif // UI_OZONE_PLATFORM_DRM_TEST_MOCK_DRM_DEVICE_H_ 148 #endif // UI_OZONE_PLATFORM_DRM_TEST_MOCK_DRM_DEVICE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.cc ('k') | ui/ozone/platform/drm/test/mock_drm_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698