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

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

Issue 10274009: GpuMemoryManager should limit memory allocations based on viewport size for android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding const Created 8 years, 7 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
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.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 (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_COMMAND_BUFFER_STUB_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }; 60 };
61 61
62 public: 62 public:
63 virtual ~GpuCommandBufferStubBase() {} 63 virtual ~GpuCommandBufferStubBase() {}
64 64
65 // Will not have surface state if this is an offscreen commandbuffer. 65 // Will not have surface state if this is an offscreen commandbuffer.
66 virtual bool client_has_memory_allocation_changed_callback() const = 0; 66 virtual bool client_has_memory_allocation_changed_callback() const = 0;
67 virtual bool has_surface_state() const = 0; 67 virtual bool has_surface_state() const = 0;
68 virtual const SurfaceState& surface_state() const = 0; 68 virtual const SurfaceState& surface_state() const = 0;
69 69
70 virtual gfx::Size GetSurfaceSize() const = 0;
71
70 virtual bool IsInSameContextShareGroup( 72 virtual bool IsInSameContextShareGroup(
71 const GpuCommandBufferStubBase& other) const = 0; 73 const GpuCommandBufferStubBase& other) const = 0;
72 74
73 virtual void SendMemoryAllocationToProxy( 75 virtual void SendMemoryAllocationToProxy(
74 const GpuMemoryAllocation& allocation) = 0; 76 const GpuMemoryAllocation& allocation) = 0;
75 77
76 virtual void SetMemoryAllocation( 78 virtual void SetMemoryAllocation(
77 const GpuMemoryAllocation& allocation) = 0; 79 const GpuMemoryAllocation& allocation) = 0;
78 }; 80 };
79 81
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 115
114 // IPC::Message::Sender implementation: 116 // IPC::Message::Sender implementation:
115 virtual bool Send(IPC::Message* msg) OVERRIDE; 117 virtual bool Send(IPC::Message* msg) OVERRIDE;
116 118
117 // GpuCommandBufferStubBase implementation: 119 // GpuCommandBufferStubBase implementation:
118 virtual bool client_has_memory_allocation_changed_callback() const OVERRIDE; 120 virtual bool client_has_memory_allocation_changed_callback() const OVERRIDE;
119 virtual bool has_surface_state() const OVERRIDE; 121 virtual bool has_surface_state() const OVERRIDE;
120 virtual const GpuCommandBufferStubBase::SurfaceState& surface_state() const 122 virtual const GpuCommandBufferStubBase::SurfaceState& surface_state() const
121 OVERRIDE; 123 OVERRIDE;
122 124
125 // Returns surface size.
126 virtual gfx::Size GetSurfaceSize() const OVERRIDE;
127
123 // Returns true iff |other| is in the same context share group as this stub. 128 // Returns true iff |other| is in the same context share group as this stub.
124 virtual bool IsInSameContextShareGroup( 129 virtual bool IsInSameContextShareGroup(
125 const GpuCommandBufferStubBase& other) const OVERRIDE; 130 const GpuCommandBufferStubBase& other) const OVERRIDE;
126 131
127 // Sends memory allocation limits to render process. 132 // Sends memory allocation limits to render process.
128 virtual void SendMemoryAllocationToProxy( 133 virtual void SendMemoryAllocationToProxy(
129 const GpuMemoryAllocation& allocation) OVERRIDE; 134 const GpuMemoryAllocation& allocation) OVERRIDE;
130 135
131 // Sets buffer usage depending on Memory Allocation 136 // Sets buffer usage depending on Memory Allocation
132 virtual void SetMemoryAllocation( 137 virtual void SetMemoryAllocation(
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; 262 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_;
258 263
259 ObserverList<DestructionObserver> destruction_observers_; 264 ObserverList<DestructionObserver> destruction_observers_;
260 265
261 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 266 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
262 }; 267 };
263 268
264 #endif // defined(ENABLE_GPU) 269 #endif // defined(ENABLE_GPU)
265 270
266 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 271 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698