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

Side by Side Diff: content/common/gpu/gpu_memory_manager.h

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes, rebasing with master Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 16
17 class GpuCommandBufferStubBase; 17 class GpuCommandBufferStubBase;
18 18
19 class CONTENT_EXPORT GpuMemoryManagerClient { 19 class CONTENT_EXPORT GpuMemoryManagerClient {
20 public: 20 public:
21 virtual ~GpuMemoryManagerClient() {} 21 virtual ~GpuMemoryManagerClient() {}
22 22
23 virtual void AppendAllCommandBufferStubs( 23 virtual void AppendAllCommandBufferStubs(
24 std::vector<GpuCommandBufferStubBase*>& stubs) = 0; 24 std::vector<GpuCommandBufferStubBase*>& stubs) = 0;
25 }; 25 };
26 26
27 class CONTENT_EXPORT GpuMemoryManager { 27 class CONTENT_EXPORT GpuMemoryManager {
28 public: 28 public:
29 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 8 }; 29 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 3 };
mmocny 2012/06/01 21:06:51 This was checked in accidentally. I'll fix it in
mmocny 2012/06/05 14:52:35 Done.
30 30
31 // These are predefined values (in bytes) for 31 // These are predefined values (in bytes) for
32 // GpuMemoryAllocation::gpuResourceSizeInBytes. 32 // GpuMemoryAllocation::gpuResourceSizeInBytes.
33 // Maximum Allocation for all tabs is a soft limit that can be exceeded 33 // Maximum Allocation for all tabs is a soft limit that can be exceeded
34 // during the time it takes for renderers to respect new allocations, 34 // during the time it takes for renderers to respect new allocations,
35 // including when switching tabs or opening a new window. 35 // including when switching tabs or opening a new window.
36 // To alleviate some pressure, we decrease our desired limit by "one tabs' 36 // To alleviate some pressure, we decrease our desired limit by "one tabs'
37 // worth" of memory. 37 // worth" of memory.
38 enum { 38 enum {
39 #if defined(OS_ANDROID) 39 #if defined(OS_ANDROID)
(...skipping 25 matching lines...) Expand all
65 bool manage_scheduled_; 65 bool manage_scheduled_;
66 size_t max_surfaces_with_frontbuffer_soft_limit_; 66 size_t max_surfaces_with_frontbuffer_soft_limit_;
67 base::WeakPtrFactory<GpuMemoryManager> weak_factory_; 67 base::WeakPtrFactory<GpuMemoryManager> weak_factory_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); 69 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
70 }; 70 };
71 71
72 #endif 72 #endif
73 73
74 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 74 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698