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

Side by Side Diff: ui/ozone/gl/gl_image_ozone_native_pixmap.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/ozone/demo/surfaceless_gl_renderer.cc ('k') | ui/ozone/gl/gl_image_ozone_native_pixmap.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_OZONE_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ 5 #ifndef UI_OZONE_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_
6 #define UI_OZONE_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ 6 #define UI_OZONE_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "ui/gfx/buffer_types.h" 12 #include "ui/gfx/buffer_types.h"
13 #include "ui/gl/gl_image_egl.h" 13 #include "ui/gl/gl_image_egl.h"
14 #include "ui/ozone/gl/ozone_gl_export.h" 14 #include "ui/ozone/gl/ozone_gl_export.h"
15 #include "ui/ozone/public/native_pixmap.h" 15 #include "ui/ozone/public/native_pixmap.h"
16 16
17 namespace ui { 17 namespace ui {
18 18
19 class OZONE_GL_EXPORT GLImageOzoneNativePixmap : public gl::GLImageEGL { 19 class OZONE_GL_EXPORT GLImageOzoneNativePixmap : public gl::GLImageEGL {
20 public: 20 public:
21 GLImageOzoneNativePixmap(const gfx::Size& size, unsigned internalformat); 21 GLImageOzoneNativePixmap(const gfx::Size& size, unsigned internalformat);
22 22
23 bool Initialize(NativePixmap* pixmap, gfx::BufferFormat format); 23 bool Initialize(NativePixmap* pixmap, gfx::BufferFormat format);
24 24
25 // Overridden from GLImage: 25 // Overridden from GLImage:
26 unsigned GetInternalFormat() override; 26 unsigned GetInternalFormat() override;
27 void Destroy(bool have_context) override;
28 bool CopyTexImage(unsigned target) override; 27 bool CopyTexImage(unsigned target) override;
29 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 28 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
30 int z_order, 29 int z_order,
31 gfx::OverlayTransform transform, 30 gfx::OverlayTransform transform,
32 const gfx::Rect& bounds_rect, 31 const gfx::Rect& bounds_rect,
33 const gfx::RectF& crop_rect) override; 32 const gfx::RectF& crop_rect) override;
34 void Flush() override; 33 void Flush() override;
35 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 34 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
36 uint64_t process_tracing_id, 35 uint64_t process_tracing_id,
37 const std::string& dump_name) override; 36 const std::string& dump_name) override;
38 37
39 static unsigned GetInternalFormatForTesting(gfx::BufferFormat format); 38 static unsigned GetInternalFormatForTesting(gfx::BufferFormat format);
40 39
41 protected: 40 protected:
42 ~GLImageOzoneNativePixmap() override; 41 ~GLImageOzoneNativePixmap() override;
43 42
44 private: 43 private:
45 unsigned internalformat_; 44 unsigned internalformat_;
46 scoped_refptr<NativePixmap> pixmap_; 45 scoped_refptr<NativePixmap> pixmap_;
47 bool has_image_flush_external_; 46 bool has_image_flush_external_;
48 }; 47 };
49 48
50 } // namespace ui 49 } // namespace ui
51 50
52 #endif // UI_OZONE_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ 51 #endif // UI_OZONE_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_
OLDNEW
« no previous file with comments | « ui/ozone/demo/surfaceless_gl_renderer.cc ('k') | ui/ozone/gl/gl_image_ozone_native_pixmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698