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

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

Issue 2443023002: gpu: Add CHROMIUM_copy_image extension.
Patch Set: rebase 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_io_surface.mm ('k') | ui/gl/gl_image_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_MEMORY_H_ 5 #ifndef UI_GL_GL_IMAGE_MEMORY_H_
6 #define UI_GL_GL_IMAGE_MEMORY_H_ 6 #define UI_GL_GL_IMAGE_MEMORY_H_
7 7
8 #include "ui/gl/gl_image.h" 8 #include "ui/gl/gl_image.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 16 matching lines...) Expand all
27 // Overridden from GLImage: 27 // Overridden from GLImage:
28 void Destroy(bool have_context) override; 28 void Destroy(bool have_context) override;
29 gfx::Size GetSize() override; 29 gfx::Size GetSize() override;
30 unsigned GetInternalFormat() override; 30 unsigned GetInternalFormat() override;
31 bool BindTexImage(unsigned target, GLFence* fence) override; 31 bool BindTexImage(unsigned target, GLFence* fence) override;
32 void ReleaseTexImage(unsigned target) override {} 32 void ReleaseTexImage(unsigned target) override {}
33 bool CopyTexImage(unsigned target) override; 33 bool CopyTexImage(unsigned target) override;
34 bool CopyTexSubImage(unsigned target, 34 bool CopyTexSubImage(unsigned target,
35 const gfx::Point& offset, 35 const gfx::Point& offset,
36 const gfx::Rect& rect) override; 36 const gfx::Rect& rect) override;
37 bool CopySubImageData(unsigned texture_id,
38 const gfx::Point& offset,
39 const gfx::Rect& rect,
40 GLFence* in_fence,
41 GLFence* out_fence) override;
37 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 42 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
38 int z_order, 43 int z_order,
39 gfx::OverlayTransform transform, 44 gfx::OverlayTransform transform,
40 const gfx::Rect& bounds_rect, 45 const gfx::Rect& bounds_rect,
41 const gfx::RectF& crop_rect) override; 46 const gfx::RectF& crop_rect) override;
42 void Flush() override {} 47 void Flush() override {}
43 48
44 static unsigned GetInternalFormatForTesting(gfx::BufferFormat format); 49 static unsigned GetInternalFormatForTesting(gfx::BufferFormat format);
45 50
46 protected: 51 protected:
47 ~GLImageMemory() override; 52 ~GLImageMemory() override;
48 53
49 gfx::BufferFormat format() const { return format_; } 54 gfx::BufferFormat format() const { return format_; }
50 size_t stride() const { return stride_; } 55 size_t stride() const { return stride_; }
51 56
52 private: 57 private:
53 const gfx::Size size_; 58 const gfx::Size size_;
54 const unsigned internalformat_; 59 const unsigned internalformat_;
55 const unsigned char* memory_; 60 const unsigned char* memory_;
56 gfx::BufferFormat format_; 61 gfx::BufferFormat format_;
57 size_t stride_; 62 size_t stride_;
58 63
59 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); 64 DISALLOW_COPY_AND_ASSIGN(GLImageMemory);
60 }; 65 };
61 66
62 } // namespace gl 67 } // namespace gl
63 68
64 #endif // UI_GL_GL_IMAGE_MEMORY_H_ 69 #endif // UI_GL_GL_IMAGE_MEMORY_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_image_io_surface.mm ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698