OLD | NEW |
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 SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ | 5 #ifndef SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ |
6 #define SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ | 6 #define SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "cc/output/in_process_context_provider.h" | 10 #include "cc/output/in_process_context_provider.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 DisplayOutputSurface( | 23 DisplayOutputSurface( |
24 scoped_refptr<cc::InProcessContextProvider> context_provider, | 24 scoped_refptr<cc::InProcessContextProvider> context_provider, |
25 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source); | 25 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source); |
26 ~DisplayOutputSurface() override; | 26 ~DisplayOutputSurface() override; |
27 | 27 |
28 // cc::OutputSurface implementation | 28 // cc::OutputSurface implementation |
29 void BindToClient(cc::OutputSurfaceClient* client) override; | 29 void BindToClient(cc::OutputSurfaceClient* client) override; |
30 void EnsureBackbuffer() override; | 30 void EnsureBackbuffer() override; |
31 void DiscardBackbuffer() override; | 31 void DiscardBackbuffer() override; |
32 void BindFramebuffer() override; | 32 void BindFramebuffer() override; |
| 33 void SetDrawRectangle(const gfx::Rect& draw_rectangle) override; |
33 void Reshape(const gfx::Size& size, | 34 void Reshape(const gfx::Size& size, |
34 float device_scale_factor, | 35 float device_scale_factor, |
35 const gfx::ColorSpace& color_space, | 36 const gfx::ColorSpace& color_space, |
36 bool has_alpha, | 37 bool has_alpha, |
37 bool use_stencil) override; | 38 bool use_stencil) override; |
38 void SwapBuffers(cc::OutputSurfaceFrame frame) override; | 39 void SwapBuffers(cc::OutputSurfaceFrame frame) override; |
39 uint32_t GetFramebufferCopyTextureFormat() override; | 40 uint32_t GetFramebufferCopyTextureFormat() override; |
40 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; | 41 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; |
41 bool IsDisplayedAsOverlayPlane() const override; | 42 bool IsDisplayedAsOverlayPlane() const override; |
42 unsigned GetOverlayTextureId() const override; | 43 unsigned GetOverlayTextureId() const override; |
(...skipping 11 matching lines...) Expand all Loading... |
54 // Called when a swap completion is signaled from ImageTransportSurface. | 55 // Called when a swap completion is signaled from ImageTransportSurface. |
55 void OnGpuSwapBuffersCompleted( | 56 void OnGpuSwapBuffersCompleted( |
56 const std::vector<ui::LatencyInfo>& latency_info, | 57 const std::vector<ui::LatencyInfo>& latency_info, |
57 gfx::SwapResult result, | 58 gfx::SwapResult result, |
58 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); | 59 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); |
59 void OnVSyncParametersUpdated(base::TimeTicks timebase, | 60 void OnVSyncParametersUpdated(base::TimeTicks timebase, |
60 base::TimeDelta interval); | 61 base::TimeDelta interval); |
61 | 62 |
62 cc::OutputSurfaceClient* client_ = nullptr; | 63 cc::OutputSurfaceClient* client_ = nullptr; |
63 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; | 64 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; |
| 65 bool set_draw_rectangle_for_frame_ = false; |
| 66 // True if the draw rectangle has been set at all since the last resize. |
| 67 bool has_set_draw_rectangle_since_last_resize_ = false; |
| 68 gfx::Size size_; |
64 | 69 |
65 base::WeakPtrFactory<DisplayOutputSurface> weak_ptr_factory_; | 70 base::WeakPtrFactory<DisplayOutputSurface> weak_ptr_factory_; |
66 }; | 71 }; |
67 | 72 |
68 } // namespace ui | 73 } // namespace ui |
69 | 74 |
70 #endif // SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ | 75 #endif // SERVICES_UI_SURFACES_DISPLAY_OUTPUT_SURFACE_H_ |
OLD | NEW |