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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_surface.h

Issue 2011713003: Roll skia to 8cc209111876b7c78b5ec577c9221d8ed5e21024 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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
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_GPU_DRM_SURFACE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_SURFACE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_SURFACE_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_SURFACE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
(...skipping 11 matching lines...) Expand all
22 class DrmBuffer; 22 class DrmBuffer;
23 class DrmWindow; 23 class DrmWindow;
24 class HardwareDisplayController; 24 class HardwareDisplayController;
25 25
26 class OZONE_EXPORT DrmSurface : public SurfaceOzoneCanvas { 26 class OZONE_EXPORT DrmSurface : public SurfaceOzoneCanvas {
27 public: 27 public:
28 DrmSurface(DrmWindow* window_delegate); 28 DrmSurface(DrmWindow* window_delegate);
29 ~DrmSurface() override; 29 ~DrmSurface() override;
30 30
31 // SurfaceOzoneCanvas: 31 // SurfaceOzoneCanvas:
32 skia::RefPtr<SkSurface> GetSurface() override; 32 sk_sp<SkSurface> GetSurface() override;
33 void ResizeCanvas(const gfx::Size& viewport_size) override; 33 void ResizeCanvas(const gfx::Size& viewport_size) override;
34 void PresentCanvas(const gfx::Rect& damage) override; 34 void PresentCanvas(const gfx::Rect& damage) override;
35 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; 35 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
36 36
37 private: 37 private:
38 void SchedulePageFlip(); 38 void SchedulePageFlip();
39 39
40 // Callback for SchedulePageFlip(). This will signal when the page flip event 40 // Callback for SchedulePageFlip(). This will signal when the page flip event
41 // has completed. 41 // has completed.
42 void OnPageFlip(gfx::SwapResult result); 42 void OnPageFlip(gfx::SwapResult result);
43 43
44 DrmWindow* window_delegate_; 44 DrmWindow* window_delegate_;
45 45
46 // The actual buffers used for painting. 46 // The actual buffers used for painting.
47 scoped_refptr<DrmBuffer> front_buffer_; 47 scoped_refptr<DrmBuffer> front_buffer_;
48 scoped_refptr<DrmBuffer> back_buffer_; 48 scoped_refptr<DrmBuffer> back_buffer_;
49 49
50 skia::RefPtr<SkSurface> surface_; 50 sk_sp<SkSurface> surface_;
51 gfx::Rect last_damage_; 51 gfx::Rect last_damage_;
52 52
53 // Keep track of the requested image and damage for the last presentation. 53 // Keep track of the requested image and damage for the last presentation.
54 // This will be used to update the scanout buffers once the previous page flip 54 // This will be used to update the scanout buffers once the previous page flip
55 // events completes. 55 // events completes.
56 skia::RefPtr<SkImage> pending_image_; 56 sk_sp<SkImage> pending_image_;
57 gfx::Rect pending_image_damage_; 57 gfx::Rect pending_image_damage_;
58 bool pending_pageflip_ = false; 58 bool pending_pageflip_ = false;
59 59
60 base::WeakPtrFactory<DrmSurface> weak_ptr_factory_; 60 base::WeakPtrFactory<DrmSurface> weak_ptr_factory_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(DrmSurface); 62 DISALLOW_COPY_AND_ASSIGN(DrmSurface);
63 }; 63 };
64 64
65 } // namespace ui 65 } // namespace ui
66 66
67 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_SURFACE_H_ 67 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_console_buffer.cc ('k') | ui/ozone/platform/drm/gpu/drm_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698