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

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: Added intersect of src_size to actual texture_size 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
64 const gfx::Rect& src_rect,
64 const gfx::Size& dst_size, 65 const gfx::Size& dst_size,
65 bool vertically_flip_texture); 66 bool vertically_flip_texture);
66 67
67 // Returns the shader compiled from the source. 68 // Returns the shader compiled from the source.
68 WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source, 69 WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source,
69 WebKit::WGC3Denum type); 70 WebKit::WGC3Denum type);
70 71
71 // Copies all pixels from |previous_texture| into |texture| that are 72 // Copies all pixels from |previous_texture| into |texture| that are
72 // inside the region covered by |old_damage| but not part of |new_damage|. 73 // inside the region covered by |old_damage| but not part of |new_damage|.
73 void CopySubBufferDamage(WebKit::WebGLId texture, 74 void CopySubBufferDamage(WebKit::WebGLId texture,
(...skipping 12 matching lines...) Expand all
86 87
87 // The number of all GLHelper instances. 88 // The number of all GLHelper instances.
88 static base::subtle::Atomic32 count_; 89 static base::subtle::Atomic32 count_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(GLHelper); 91 DISALLOW_COPY_AND_ASSIGN(GLHelper);
91 }; 92 };
92 93
93 } // namespace content 94 } // namespace content
94 95
95 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 96 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698