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

Side by Side Diff: components/display_compositor/gl_helper_readback_support.h

Issue 1902463002: Introduce components/display_compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove bot changes. Will do in a separate CL Created 4 years, 8 months 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
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 CONTENT_BROWSER_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_ 5 #ifndef COMPONENTS_DISPLAY_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_ 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "content/browser/compositor/gl_helper.h" 12 #include "components/display_compositor/display_compositor_export.h"
13 #include "components/display_compositor/gl_helper.h"
13 14
14 namespace content { 15 namespace display_compositor {
15 16
16 class CONTENT_EXPORT GLHelperReadbackSupport { 17 class DISPLAY_COMPOSITOR_EXPORT GLHelperReadbackSupport {
17 public: 18 public:
18 enum FormatSupport { SUPPORTED, SWIZZLE, NOT_SUPPORTED }; 19 enum FormatSupport { SUPPORTED, SWIZZLE, NOT_SUPPORTED };
19 20
20 GLHelperReadbackSupport(gpu::gles2::GLES2Interface* gl); 21 GLHelperReadbackSupport(gpu::gles2::GLES2Interface* gl);
21 22
22 ~GLHelperReadbackSupport(); 23 ~GLHelperReadbackSupport();
23 24
24 // For a given color type retrieve whether readback is supported and if so 25 // For a given color type retrieve whether readback is supported and if so
25 // how it should be performed. The |format|, |type| and |bytes_per_pixel| are 26 // how it should be performed. The |format|, |type| and |bytes_per_pixel| are
26 // the values that should be used with glReadPixels to facilitate the 27 // the values that should be used with glReadPixels to facilitate the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Avoid using this API in between texture operations, as this does some 64 // Avoid using this API in between texture operations, as this does some
64 // teture opertions (bind, attach) internally. 65 // teture opertions (bind, attach) internally.
65 bool SupportsFormat(GLenum format, GLenum type); 66 bool SupportsFormat(GLenum format, GLenum type);
66 67
67 FormatSupport format_support_table_[kLastEnum_SkColorType + 1]; 68 FormatSupport format_support_table_[kLastEnum_SkColorType + 1];
68 69
69 gpu::gles2::GLES2Interface* gl_; 70 gpu::gles2::GLES2Interface* gl_;
70 std::vector<struct FormatCacheEntry> format_cache_; 71 std::vector<struct FormatCacheEntry> format_cache_;
71 }; 72 };
72 73
73 } // namespace content 74 } // namespace display_compositor
74 75
75 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_ 76 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_
OLDNEW
« no previous file with comments | « components/display_compositor/gl_helper_benchmark.cc ('k') | components/display_compositor/gl_helper_readback_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698