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

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

Issue 1227233002: Mac: Don't draw a cc::Surface while suspended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix other platform compile Created 5 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 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 "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "content/browser/compositor/browser_compositor_output_surface.h" 9 #include "content/browser/compositor/browser_compositor_output_surface.h"
10 #include "ui/gfx/swap_result.h" 10 #include "ui/gfx/swap_result.h"
(...skipping 21 matching lines...) Expand all
32 32
33 ~GpuBrowserCompositorOutputSurface() override; 33 ~GpuBrowserCompositorOutputSurface() override;
34 34
35 protected: 35 protected:
36 // BrowserCompositorOutputSurface: 36 // BrowserCompositorOutputSurface:
37 void OnReflectorChanged() override; 37 void OnReflectorChanged() override;
38 38
39 // cc::OutputSurface implementation. 39 // cc::OutputSurface implementation.
40 void SwapBuffers(cc::CompositorFrame* frame) override; 40 void SwapBuffers(cc::CompositorFrame* frame) override;
41 bool BindToClient(cc::OutputSurfaceClient* client) override; 41 bool BindToClient(cc::OutputSurfaceClient* client) override;
42 bool SurfaceIsSuspendForRecycle() const override;
42 43
43 #if defined(OS_MACOSX) 44 #if defined(OS_MACOSX)
44 void OnSurfaceDisplayed() override; 45 void OnSurfaceDisplayed() override;
45 void SetSurfaceSuspendedForRecycle(bool suspended) override; 46 void SetSurfaceSuspendedForRecycle(bool suspended) override;
46 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override; 47 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override;
47 enum ShouldShowFramesState { 48 enum ShouldShowFramesState {
48 // Frames that come from the GPU process should appear on-screen. 49 // Frames that come from the GPU process should appear on-screen.
49 SHOULD_SHOW_FRAMES, 50 SHOULD_SHOW_FRAMES,
50 // The compositor has been suspended. Any frames that come from the GPU 51 // The compositor has been suspended. Any frames that come from the GPU
51 // process are for the pre-suspend content and should not be displayed. 52 // process are for the pre-suspend content and should not be displayed.
(...skipping 19 matching lines...) Expand all
71 update_vsync_parameters_callback_; 72 update_vsync_parameters_callback_;
72 73
73 scoped_ptr<ReflectorTexture> reflector_texture_; 74 scoped_ptr<ReflectorTexture> reflector_texture_;
74 75
75 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); 76 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
76 }; 77 };
77 78
78 } // namespace content 79 } // namespace content
79 80
80 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 81 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display.cc ('k') | content/browser/compositor/gpu_browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698