Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ | |
| 6 #define UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ | |
| 7 | |
| 8 #include "ui/gfx/gpu_memory_buffer.h" | |
| 9 #include "ui/gl/gl_image.h" | |
| 10 #include "ui/ozone/public/native_pixmap.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 | |
| 14 class GL_EXPORT GLImageOzoneNativePixmap : public GLImage { | |
|
reveman
2015/07/28 14:40:57
While it might not be ideal we currently use inher
dshwang
2015/07/28 16:21:55
GLImageOzoneNativePixmap inherits GLImageLinuxDMAB
spang
2015/07/28 19:34:27
This is an abuse of inheritance.
I don't think we
dshwang
2015/07/29 13:23:09
Got it. It's same opinion to reveman's. I did make
| |
| 15 public: | |
| 16 static scoped_refptr<GLImageOzoneNativePixmap> Create( | |
| 17 scoped_refptr<ui::NativePixmap> pixmap, | |
| 18 const Size& size, | |
| 19 GpuMemoryBuffer::Format format, | |
| 20 unsigned internalformat); | |
|
reveman
2015/07/28 14:40:57
Some consistency requests:
Please remove this Cre
dshwang
2015/07/28 16:21:55
Thank you for detailed explanation. Done.
| |
| 21 | |
| 22 void Destroy(bool have_context) override; | |
| 23 Size GetSize() override; | |
| 24 unsigned GetInternalFormat() override; | |
| 25 bool BindTexImage(unsigned target) override; | |
| 26 void ReleaseTexImage(unsigned target) override; | |
| 27 bool CopyTexSubImage(unsigned target, | |
| 28 const Point& offset, | |
| 29 const Rect& rect) override; | |
| 30 void WillUseTexImage() override; | |
| 31 void DidUseTexImage() override; | |
| 32 void WillModifyTexImage() override; | |
| 33 void DidModifyTexImage() override; | |
| 34 bool ScheduleOverlayPlane(AcceleratedWidget widget, | |
| 35 int z_order, | |
| 36 OverlayTransform transform, | |
| 37 const Rect& bounds_rect, | |
| 38 const RectF& crop_rect); | |
| 39 | |
| 40 private: | |
| 41 GLImageOzoneNativePixmap(scoped_refptr<ui::NativePixmap> pixmap, | |
| 42 const Size& size, | |
| 43 GpuMemoryBuffer::Format format, | |
| 44 unsigned internalformat); | |
| 45 ~GLImageOzoneNativePixmap() override; | |
| 46 bool Initialize(); | |
| 47 | |
| 48 scoped_refptr<ui::NativePixmap> pixmap_; | |
| 49 const Size size_; | |
| 50 GpuMemoryBuffer::Format format_; | |
| 51 unsigned internalformat_; | |
| 52 scoped_refptr<GLImage> image_; | |
| 53 }; | |
| 54 | |
| 55 } // namespace gfx | |
| 56 | |
| 57 #endif // UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ | |
| OLD | NEW |