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

Side by Side Diff: content/common/gpu/image_transport_surface_overlay_mac.h

Issue 1420503011: GLES2CmdDecoder should resize GLSurface using GLSurface::Resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 public ImageTransportSurface, 25 public ImageTransportSurface,
26 public ui::GpuSwitchingObserver { 26 public ui::GpuSwitchingObserver {
27 public: 27 public:
28 ImageTransportSurfaceOverlayMac(GpuChannelManager* manager, 28 ImageTransportSurfaceOverlayMac(GpuChannelManager* manager,
29 GpuCommandBufferStub* stub, 29 GpuCommandBufferStub* stub,
30 gfx::PluginWindowHandle handle); 30 gfx::PluginWindowHandle handle);
31 31
32 // GLSurface implementation 32 // GLSurface implementation
33 bool Initialize() override; 33 bool Initialize() override;
34 void Destroy() override; 34 void Destroy() override;
35 bool Resize(const gfx::Size& size, float scale_factor) override;
35 bool IsOffscreen() override; 36 bool IsOffscreen() override;
36 gfx::SwapResult SwapBuffers() override; 37 gfx::SwapResult SwapBuffers() override;
37 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; 38 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
38 bool SupportsPostSubBuffer() override; 39 bool SupportsPostSubBuffer() override;
39 gfx::Size GetSize() override; 40 gfx::Size GetSize() override;
40 void* GetHandle() override; 41 void* GetHandle() override;
41 bool OnMakeCurrent(gfx::GLContext* context) override; 42 bool OnMakeCurrent(gfx::GLContext* context) override;
42 bool SetBackbufferAllocation(bool allocated) override; 43 bool SetBackbufferAllocation(bool allocated) override;
43 bool ScheduleOverlayPlane(int z_order, 44 bool ScheduleOverlayPlane(int z_order,
44 gfx::OverlayTransform transform, 45 gfx::OverlayTransform transform,
45 gfx::GLImage* image, 46 gfx::GLImage* image,
46 const gfx::Rect& bounds_rect, 47 const gfx::Rect& bounds_rect,
47 const gfx::RectF& crop_rect) override; 48 const gfx::RectF& crop_rect) override;
48 bool IsSurfaceless() const override; 49 bool IsSurfaceless() const override;
49 50
50 // ImageTransportSurface implementation 51 // ImageTransportSurface implementation
51 void OnBufferPresented( 52 void OnBufferPresented(
52 const AcceleratedSurfaceMsg_BufferPresented_Params& params) override; 53 const AcceleratedSurfaceMsg_BufferPresented_Params& params) override;
53 void OnResize(gfx::Size pixel_size, float scale_factor) override;
54 void SetLatencyInfo(const std::vector<ui::LatencyInfo>&) override; 54 void SetLatencyInfo(const std::vector<ui::LatencyInfo>&) override;
55 55
56 // ui::GpuSwitchingObserver implementation. 56 // ui::GpuSwitchingObserver implementation.
57 void OnGpuSwitched() override; 57 void OnGpuSwitched() override;
58 58
59 private: 59 private:
60 class PendingSwap; 60 class PendingSwap;
61 class OverlayPlane; 61 class OverlayPlane;
62 62
63 ~ImageTransportSurfaceOverlayMac() override; 63 ~ImageTransportSurfaceOverlayMac() override;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::TimeTicks vsync_timebase_; 133 base::TimeTicks vsync_timebase_;
134 base::TimeDelta vsync_interval_; 134 base::TimeDelta vsync_interval_;
135 135
136 base::Timer display_pending_swap_timer_; 136 base::Timer display_pending_swap_timer_;
137 base::WeakPtrFactory<ImageTransportSurfaceOverlayMac> weak_factory_; 137 base::WeakPtrFactory<ImageTransportSurfaceOverlayMac> weak_factory_;
138 }; 138 };
139 139
140 } // namespace content 140 } // namespace content
141 141
142 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 142 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/common/gpu/image_transport_surface_overlay_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698