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

Side by Side Diff: cc/output/delegating_renderer.h

Issue 53633003: Do not give GPU memory to backgrounded compositors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/context_provider.h ('k') | cc/output/delegating_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 CC_OUTPUT_DELEGATING_RENDERER_H_ 5 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_
6 #define CC_OUTPUT_DELEGATING_RENDERER_H_ 6 #define CC_OUTPUT_DELEGATING_RENDERER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE; 42 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE;
43 43
44 virtual bool IsContextLost() OVERRIDE; 44 virtual bool IsContextLost() OVERRIDE;
45 45
46 virtual void SetVisible(bool visible) OVERRIDE; 46 virtual void SetVisible(bool visible) OVERRIDE;
47 47
48 virtual void SendManagedMemoryStats(size_t bytes_visible, 48 virtual void SendManagedMemoryStats(size_t bytes_visible,
49 size_t bytes_visible_and_nearby, 49 size_t bytes_visible_and_nearby,
50 size_t bytes_allocated) OVERRIDE; 50 size_t bytes_allocated) OVERRIDE;
51 51
52 virtual void SetDiscardBackBufferWhenNotVisible(bool discard) OVERRIDE;
53
54 private: 52 private:
55 DelegatingRenderer(RendererClient* client, 53 DelegatingRenderer(RendererClient* client,
56 const LayerTreeSettings* settings, 54 const LayerTreeSettings* settings,
57 OutputSurface* output_surface, 55 OutputSurface* output_surface,
58 ResourceProvider* resource_provider); 56 ResourceProvider* resource_provider);
59 bool Initialize(); 57 bool Initialize();
60 58
61 OutputSurface* output_surface_; 59 OutputSurface* output_surface_;
62 ResourceProvider* resource_provider_; 60 ResourceProvider* resource_provider_;
63 RendererCapabilities capabilities_; 61 RendererCapabilities capabilities_;
64 CompositorFrame frame_for_swap_buffers_; 62 CompositorFrame frame_for_swap_buffers_;
65 bool visible_; 63 bool visible_;
66 64
67 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); 65 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer);
68 }; 66 };
69 67
70 } // namespace cc 68 } // namespace cc
71 69
72 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ 70 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/context_provider.h ('k') | cc/output/delegating_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698