| OLD | NEW |
| 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 GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 8 #include <string> | 11 #include <string> |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 13 #include "gpu/command_buffer/service/gl_utils.h" | 16 #include "gpu/command_buffer/service/gl_utils.h" |
| 14 #include "gpu/command_buffer/service/memory_tracking.h" | 17 #include "gpu/command_buffer/service/memory_tracking.h" |
| 15 #include "gpu/gpu_export.h" | 18 #include "gpu/gpu_export.h" |
| 16 | 19 |
| 17 namespace gpu { | 20 namespace gpu { |
| 18 namespace gles2 { | 21 namespace gles2 { |
| 19 | 22 |
| 20 class FeatureInfo; | 23 class FeatureInfo; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 void RemoveRenderbuffer(GLuint client_id); | 167 void RemoveRenderbuffer(GLuint client_id); |
| 165 | 168 |
| 166 size_t mem_represented() const { | 169 size_t mem_represented() const { |
| 167 return memory_type_tracker_->GetMemRepresented(); | 170 return memory_type_tracker_->GetMemRepresented(); |
| 168 } | 171 } |
| 169 | 172 |
| 170 bool ComputeEstimatedRenderbufferSize(int width, | 173 bool ComputeEstimatedRenderbufferSize(int width, |
| 171 int height, | 174 int height, |
| 172 int samples, | 175 int samples, |
| 173 int internal_format, | 176 int internal_format, |
| 174 uint32* size) const; | 177 uint32_t* size) const; |
| 175 GLenum InternalRenderbufferFormatToImplFormat(GLenum impl_format) const; | 178 GLenum InternalRenderbufferFormatToImplFormat(GLenum impl_format) const; |
| 176 | 179 |
| 177 // base::trace_event::MemoryDumpProvider implementation. | 180 // base::trace_event::MemoryDumpProvider implementation. |
| 178 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, | 181 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 179 base::trace_event::ProcessMemoryDump* pmd) override; | 182 base::trace_event::ProcessMemoryDump* pmd) override; |
| 180 | 183 |
| 181 private: | 184 private: |
| 182 friend class Renderbuffer; | 185 friend class Renderbuffer; |
| 183 | 186 |
| 184 void StartTracking(Renderbuffer* renderbuffer); | 187 void StartTracking(Renderbuffer* renderbuffer); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 204 typedef base::hash_map<GLuint, scoped_refptr<Renderbuffer> > RenderbufferMap; | 207 typedef base::hash_map<GLuint, scoped_refptr<Renderbuffer> > RenderbufferMap; |
| 205 RenderbufferMap renderbuffers_; | 208 RenderbufferMap renderbuffers_; |
| 206 | 209 |
| 207 DISALLOW_COPY_AND_ASSIGN(RenderbufferManager); | 210 DISALLOW_COPY_AND_ASSIGN(RenderbufferManager); |
| 208 }; | 211 }; |
| 209 | 212 |
| 210 } // namespace gles2 | 213 } // namespace gles2 |
| 211 } // namespace gpu | 214 } // namespace gpu |
| 212 | 215 |
| 213 #endif // GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ | 216 #endif // GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ |
| OLD | NEW |