| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 SERVICES_GFX_COMPOSITOR_RENDER_RENDER_IMAGE_H_ | 5 #ifndef SERVICES_GFX_COMPOSITOR_RENDER_RENDER_IMAGE_H_ |
| 6 #define SERVICES_GFX_COMPOSITOR_RENDER_RENDER_IMAGE_H_ | 6 #define SERVICES_GFX_COMPOSITOR_RENDER_RENDER_IMAGE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 const GLbyte mailbox_name[GL_MAILBOX_SIZE_CHROMIUM], | 44 const GLbyte mailbox_name[GL_MAILBOX_SIZE_CHROMIUM], |
| 45 GLuint sync_point, | 45 GLuint sync_point, |
| 46 uint32_t width, | 46 uint32_t width, |
| 47 uint32_t height, | 47 uint32_t height, |
| 48 const scoped_refptr<base::TaskRunner>& task_runner, | 48 const scoped_refptr<base::TaskRunner>& task_runner, |
| 49 const base::Closure& release_task); | 49 const base::Closure& release_task); |
| 50 | 50 |
| 51 uint32_t width() const { return image_->width(); } | 51 uint32_t width() const { return image_->width(); } |
| 52 uint32_t height() const { return image_->height(); } | 52 uint32_t height() const { return image_->height(); } |
| 53 | 53 |
| 54 // Gets the underlying image to rasterize. | 54 // Gets the underlying image to rasterize, never null. |
| 55 const skia::RefPtr<SkImage>& image() const { return image_; } | 55 const skia::RefPtr<SkImage>& image() const { return image_; } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 skia::RefPtr<SkImage> image_; | 58 skia::RefPtr<SkImage> image_; |
| 59 std::shared_ptr<Releaser> releaser_; | 59 std::shared_ptr<Releaser> releaser_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(RenderImage); | 61 DISALLOW_COPY_AND_ASSIGN(RenderImage); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace compositor | 64 } // namespace compositor |
| 65 | 65 |
| 66 #endif // SERVICES_GFX_COMPOSITOR_RENDER_RENDER_IMAGE_H_ | 66 #endif // SERVICES_GFX_COMPOSITOR_RENDER_RENDER_IMAGE_H_ |
| OLD | NEW |