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

Side by Side Diff: gpu/ipc/service/image_transport_surface_overlay_mac.h

Issue 2006923006: Move all CARendererLayerTree parameters to separate struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 5 #ifndef GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
6 #define GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 6 #define GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #import "base/mac/scoped_nsobject.h" 12 #import "base/mac/scoped_nsobject.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "gpu/ipc/service/gpu_command_buffer_stub.h" 14 #include "gpu/ipc/service/gpu_command_buffer_stub.h"
15 #include "gpu/ipc/service/image_transport_surface.h" 15 #include "gpu/ipc/service/image_transport_surface.h"
16 #include "ui/base/cocoa/remote_layer_api.h" 16 #include "ui/base/cocoa/remote_layer_api.h"
17 #include "ui/events/latency_info.h" 17 #include "ui/events/latency_info.h"
18 #include "ui/gl/gl_surface.h" 18 #include "ui/gl/gl_surface.h"
19 #include "ui/gl/gpu_switching_observer.h" 19 #include "ui/gl/gpu_switching_observer.h"
20 20
21 @class CAContext; 21 @class CAContext;
22 @class CALayer; 22 @class CALayer;
23 23
24 namespace ui { 24 namespace ui {
25 class CALayerTreeCoordinator; 25 class CALayerTreeCoordinator;
26 struct CARendererLayerParams;
26 } 27 }
27 28
28 namespace gl { 29 namespace gl {
29 class GLFence; 30 class GLFence;
30 } 31 }
31 32
32 namespace gpu { 33 namespace gpu {
33 34
34 class ImageTransportSurfaceOverlayMac : public gl::GLSurface, 35 class ImageTransportSurfaceOverlayMac : public gl::GLSurface,
35 public ui::GpuSwitchingObserver { 36 public ui::GpuSwitchingObserver {
(...skipping 12 matching lines...) Expand all
48 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; 49 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
49 bool SupportsPostSubBuffer() override; 50 bool SupportsPostSubBuffer() override;
50 gfx::Size GetSize() override; 51 gfx::Size GetSize() override;
51 void* GetHandle() override; 52 void* GetHandle() override;
52 bool OnMakeCurrent(gl::GLContext* context) override; 53 bool OnMakeCurrent(gl::GLContext* context) override;
53 bool ScheduleOverlayPlane(int z_order, 54 bool ScheduleOverlayPlane(int z_order,
54 gfx::OverlayTransform transform, 55 gfx::OverlayTransform transform,
55 gl::GLImage* image, 56 gl::GLImage* image,
56 const gfx::Rect& bounds_rect, 57 const gfx::Rect& bounds_rect,
57 const gfx::RectF& crop_rect) override; 58 const gfx::RectF& crop_rect) override;
58 bool ScheduleCALayer(gl::GLImage* contents_image, 59 bool ScheduleCALayer(const ui::CARendererLayerParams& params) override;
59 const gfx::RectF& contents_rect,
60 float opacity,
61 unsigned background_color,
62 unsigned edge_aa_mask,
63 const gfx::RectF& rect,
64 bool is_clipped,
65 const gfx::RectF& clip_rect,
66 const gfx::Transform& transform,
67 int sorting_context_id,
68 unsigned filter) override;
69 void ScheduleCALayerInUseQuery( 60 void ScheduleCALayerInUseQuery(
70 std::vector<CALayerInUseQuery> queries) override; 61 std::vector<CALayerInUseQuery> queries) override;
71 bool IsSurfaceless() const override; 62 bool IsSurfaceless() const override;
72 63
73 // ui::GpuSwitchingObserver implementation. 64 // ui::GpuSwitchingObserver implementation.
74 void OnGpuSwitched() override; 65 void OnGpuSwitched() override;
75 66
76 private: 67 private:
77 ~ImageTransportSurfaceOverlayMac() override; 68 ~ImageTransportSurfaceOverlayMac() override;
78 69
(...skipping 30 matching lines...) Expand all
109 base::ScopedTypeRef<CGLContextObj> fence_context_obj_; 100 base::ScopedTypeRef<CGLContextObj> fence_context_obj_;
110 101
111 // The renderer ID that all contexts made current to this surface should be 102 // The renderer ID that all contexts made current to this surface should be
112 // targeting. 103 // targeting.
113 GLint gl_renderer_id_; 104 GLint gl_renderer_id_;
114 }; 105 };
115 106
116 } // namespace gpu 107 } // namespace gpu
117 108
118 #endif // GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 109 #endif // GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698