| Index: gpu/ipc/service/direct_composition_surface_win.h | 
| diff --git a/gpu/ipc/service/direct_composition_surface_win.h b/gpu/ipc/service/direct_composition_surface_win.h | 
| index e2121eaaca0aacec70b95e26959181bd322e08af..ebc5f03cf6ae9ec23e29a3a405ba79ca25a7c72e 100644 | 
| --- a/gpu/ipc/service/direct_composition_surface_win.h | 
| +++ b/gpu/ipc/service/direct_composition_surface_win.h | 
| @@ -21,6 +21,7 @@ | 
| namespace gpu { | 
|  | 
| class DCLayerTree; | 
| +class DirectCompositionChildSurfaceWin; | 
|  | 
| class GPU_EXPORT DirectCompositionSurfaceWin : public gl::GLSurfaceEGL { | 
| public: | 
| @@ -64,14 +65,10 @@ class GPU_EXPORT DirectCompositionSurfaceWin : public gl::GLSurfaceEGL { | 
| // tree at z-order 0. | 
| bool ScheduleDCLayer(const ui::DCRendererLayerParams& params) override; | 
|  | 
| -  const base::win::ScopedComPtr<IDCompositionSurface>& dcomp_surface() const { | 
| -    return dcomp_surface_; | 
| -  } | 
| +  const base::win::ScopedComPtr<IDCompositionSurface> dcomp_surface() const; | 
| +  const base::win::ScopedComPtr<IDXGISwapChain1> swap_chain() const; | 
|  | 
| scoped_refptr<base::TaskRunner> GetWindowTaskRunnerForTesting(); | 
| -  const base::win::ScopedComPtr<IDXGISwapChain1>& swap_chain() const { | 
| -    return swap_chain_; | 
| -  } | 
|  | 
| base::win::ScopedComPtr<IDXGISwapChain1> GetLayerSwapChainForTesting( | 
| size_t index) const; | 
| @@ -82,12 +79,7 @@ class GPU_EXPORT DirectCompositionSurfaceWin : public gl::GLSurfaceEGL { | 
| ~DirectCompositionSurfaceWin() override; | 
|  | 
| private: | 
| -  void ReleaseCurrentSurface(); | 
| -  void InitializeSurface(); | 
| -  // Release the texture that's currently being drawn to. If will_discard is | 
| -  // true then the surface should be discarded without swapping any contents | 
| -  // to it. | 
| -  void ReleaseDrawTexture(bool will_discard); | 
| +  bool RecreateRootSurface(); | 
|  | 
| ChildWindowWin child_window_; | 
|  | 
| @@ -98,27 +90,15 @@ class GPU_EXPORT DirectCompositionSurfaceWin : public gl::GLSurfaceEGL { | 
| // DirectComposition surface. | 
| EGLSurface default_surface_ = 0; | 
|  | 
| -  // This is the real surface representing the backbuffer. It may be null | 
| -  // outside of a BeginDraw/EndDraw pair. | 
| -  EGLSurface real_surface_ = 0; | 
| gfx::Size size_ = gfx::Size(1, 1); | 
| -  bool first_swap_ = true; | 
| bool enable_dc_layers_ = false; | 
| bool has_alpha_ = true; | 
| std::unique_ptr<gfx::VSyncProvider> vsync_provider_; | 
| -  gfx::Rect swap_rect_; | 
| +  scoped_refptr<DirectCompositionChildSurfaceWin> root_surface_; | 
| std::unique_ptr<DCLayerTree> layer_tree_; | 
| -  gfx::Vector2d draw_offset_; | 
|  | 
| base::win::ScopedComPtr<ID3D11Device> d3d11_device_; | 
| base::win::ScopedComPtr<IDCompositionDevice2> dcomp_device_; | 
| -  base::win::ScopedComPtr<IDCompositionSurface> dcomp_surface_; | 
| -  base::win::ScopedComPtr<IDXGISwapChain1> swap_chain_; | 
| -  base::win::ScopedComPtr<ID3D11Texture2D> draw_texture_; | 
| - | 
| -  // Keep track of whether the texture has been rendered to, as the first draw | 
| -  // to it must overwrite the entire thing. | 
| -  bool has_been_rendered_to_ = false; | 
|  | 
| DISALLOW_COPY_AND_ASSIGN(DirectCompositionSurfaceWin); | 
| }; | 
|  |