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

Side by Side Diff: ui/gl/gl_image_ref_counted_memory.h

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: One more Destroy() call on Mac. Created 4 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
« no previous file with comments | « ui/gl/gl_image_memory.cc ('k') | ui/gl/gl_image_ref_counted_memory.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 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 UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_ 5 #ifndef UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_
6 #define UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_ 6 #define UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "ui/gl/gl_export.h" 12 #include "ui/gl/gl_export.h"
13 #include "ui/gl/gl_image_memory.h" 13 #include "ui/gl/gl_image_memory.h"
14 14
15 namespace base { 15 namespace base {
16 class RefCountedMemory; 16 class RefCountedMemory;
17 } 17 }
18 18
19 namespace gl { 19 namespace gl {
20 20
21 class GL_EXPORT GLImageRefCountedMemory : public GLImageMemory { 21 class GL_EXPORT GLImageRefCountedMemory : public GLImageMemory {
22 public: 22 public:
23 GLImageRefCountedMemory(const gfx::Size& size, unsigned internalformat); 23 GLImageRefCountedMemory(const gfx::Size& size, unsigned internalformat);
24 24
25 bool Initialize(base::RefCountedMemory* ref_counted_memory, 25 bool Initialize(base::RefCountedMemory* ref_counted_memory,
26 gfx::BufferFormat format); 26 gfx::BufferFormat format);
27 27
28 // Overridden from GLImage: 28 // Overridden from GLImage:
29 void Destroy(bool have_context) override;
30 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 29 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
31 uint64_t process_tracing_id, 30 uint64_t process_tracing_id,
32 const std::string& dump_name) override; 31 const std::string& dump_name) override;
33 32
34 protected: 33 protected:
35 ~GLImageRefCountedMemory() override; 34 ~GLImageRefCountedMemory() override;
36 35
37 private: 36 private:
38 scoped_refptr<base::RefCountedMemory> ref_counted_memory_; 37 scoped_refptr<base::RefCountedMemory> ref_counted_memory_;
39 38
40 DISALLOW_COPY_AND_ASSIGN(GLImageRefCountedMemory); 39 DISALLOW_COPY_AND_ASSIGN(GLImageRefCountedMemory);
41 }; 40 };
42 41
43 } // namespace gl 42 } // namespace gl
44 43
45 #endif // UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_ 44 #endif // UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_image_memory.cc ('k') | ui/gl/gl_image_ref_counted_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698