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

Side by Side Diff: content/common/gpu/client/gl_helper.h

Issue 11558039: Subrect snapshot support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed indents Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMMON_GPU_CLIENT_GL_HELPER_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const gfx::Size& dst_size, 43 const gfx::Size& dst_size,
44 unsigned char* out, 44 unsigned char* out,
45 const base::Callback<void(bool)>& callback); 45 const base::Callback<void(bool)>& callback);
46 46
47 // Copies the texture data out of |texture| into |out|. |size| is the 47 // Copies the texture data out of |texture| into |out|. |size| is the
48 // size of the texture. No post processing is applied to the pixels. The 48 // size of the texture. No post processing is applied to the pixels. The
49 // texture is assumed to have a format of GL_RGBA with a pixel type of 49 // texture is assumed to have a format of GL_RGBA with a pixel type of
50 // GL_UNSIGNED_BYTE. This is a blocking call that calls glReadPixels on this 50 // GL_UNSIGNED_BYTE. This is a blocking call that calls glReadPixels on this
51 // current context. 51 // current context.
52 void ReadbackTextureSync(WebKit::WebGLId texture, 52 void ReadbackTextureSync(WebKit::WebGLId texture,
53 const gfx::Size& size, 53 const gfx::Rect& src_rect,
54 unsigned char* out); 54 unsigned char* out);
55 55
56 // Creates a copy of the specified texture. |size| is the size of the texture. 56 // Creates a copy of the specified texture. |size| is the size of the texture.
57 WebKit::WebGLId CopyTexture(WebKit::WebGLId texture, 57 WebKit::WebGLId CopyTexture(WebKit::WebGLId texture,
58 const gfx::Size& size); 58 const gfx::Size& size);
59 59
60 // Creates a scaled copy of the specified texture. |src_size| is the size of 60 // Creates a scaled copy of the specified texture. |src_size| is the size of
61 // the texture and |dst_size| is the size of the resulting copy. 61 // the texture and |dst_size| is the size of the resulting copy.
62 WebKit::WebGLId CopyAndScaleTexture(WebKit::WebGLId texture, 62 WebKit::WebGLId CopyAndScaleTexture(WebKit::WebGLId texture,
63 const gfx::Size& src_size, 63 const gfx::Size& src_size,
(...skipping 22 matching lines...) Expand all
86 86
87 // The number of all GLHelper instances. 87 // The number of all GLHelper instances.
88 static base::subtle::Atomic32 count_; 88 static base::subtle::Atomic32 count_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(GLHelper); 90 DISALLOW_COPY_AND_ASSIGN(GLHelper);
91 }; 91 };
92 92
93 } // namespace content 93 } // namespace content
94 94
95 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 95 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698