Adding status to swap buffers completion
[chromium-blink-merge.git] / ui / ozone / platform / drm / gpu / page_flip_request.h
blob6daa8a3b69fee830ddb953ccd75dcf064bfbc720
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
3 // found in the LICENSE file.
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_
8 #include "base/atomic_ref_count.h"
9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/gfx/swap_result.h"
12 #include "ui/ozone/public/surface_ozone_egl.h"
14 namespace ui {
16 class PageFlipRequest : public base::RefCounted<PageFlipRequest> {
17 public:
18 PageFlipRequest(int crtc_count, const SwapCompletionCallback& callback);
20 void Signal(gfx::SwapResult result);
22 private:
23 friend class base::RefCounted<PageFlipRequest>;
24 ~PageFlipRequest();
26 SwapCompletionCallback callback_;
27 int crtc_count_;
28 gfx::SwapResult result_;
30 DISALLOW_COPY_AND_ASSIGN(PageFlipRequest);
33 } // namespace ui
35 #endif // UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_