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

Side by Side Diff: content/browser/compositor/gpu_browser_compositor_output_surface.h

Issue 2646243002: Use IDCompositionSurface to implement DirectCompositionSurfaceWin. (Closed)
Patch Set: better Created 3 years, 10 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 CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void Reshape(const gfx::Size& size, 69 void Reshape(const gfx::Size& size,
70 float device_scale_factor, 70 float device_scale_factor,
71 const gfx::ColorSpace& color_space, 71 const gfx::ColorSpace& color_space,
72 bool has_alpha, 72 bool has_alpha,
73 bool use_stencil) override; 73 bool use_stencil) override;
74 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 74 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
75 uint32_t GetFramebufferCopyTextureFormat() override; 75 uint32_t GetFramebufferCopyTextureFormat() override;
76 bool IsDisplayedAsOverlayPlane() const override; 76 bool IsDisplayedAsOverlayPlane() const override;
77 unsigned GetOverlayTextureId() const override; 77 unsigned GetOverlayTextureId() const override;
78 bool SurfaceIsSuspendForRecycle() const override; 78 bool SurfaceIsSuspendForRecycle() const override;
79 void SetDrawRectangle(const gfx::Rect& rect) override;
79 80
80 protected: 81 protected:
81 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); 82 gpu::CommandBufferProxyImpl* GetCommandBufferProxy();
82 83
83 cc::OutputSurfaceClient* client_ = nullptr; 84 cc::OutputSurfaceClient* client_ = nullptr;
84 std::unique_ptr<ReflectorTexture> reflector_texture_; 85 std::unique_ptr<ReflectorTexture> reflector_texture_;
86 bool set_draw_rectangle_for_frame_ = false;
87 // True if the draw rectangle has been set at all since the last resize.
88 bool has_set_draw_rectangle_ = false;
89 gfx::Size size_;
85 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_; 90 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_;
86 91
87 private: 92 private:
88 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); 93 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
89 }; 94 };
90 95
91 } // namespace content 96 } // namespace content
92 97
93 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 98 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698