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

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

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, fixed post sub buffer, use multiple mailbox names Created 8 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 | 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Creates a scaled copy of the specified texture. |src_size| is the size of 58 // Creates a scaled copy of the specified texture. |src_size| is the size of
59 // the texture and |dst_size| is the size of the resulting copy. 59 // the texture and |dst_size| is the size of the resulting copy.
60 WebKit::WebGLId CopyAndScaleTexture(WebKit::WebGLId texture, 60 WebKit::WebGLId CopyAndScaleTexture(WebKit::WebGLId texture,
61 const gfx::Size& src_size, 61 const gfx::Size& src_size,
62 const gfx::Size& dst_size); 62 const gfx::Size& dst_size);
63 63
64 // Returns the shader compiled from the source. 64 // Returns the shader compiled from the source.
65 WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source, 65 WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source,
66 WebKit::WGC3Denum type); 66 WebKit::WGC3Denum type);
67 67
68 // Copies all pixels from |previous_texture| into |texture| that are
69 // inside the region covered by |old_damage| but not part of |new_damage|.
70 void CopySubBufferDamage(WebKit::WebGLId texture,
71 WebKit::WebGLId previous_texture,
72 const gfx::Rect& new_damage,
73 const gfx::Rect& old_damage);
68 private: 74 private:
69 class CopyTextureToImpl; 75 class CopyTextureToImpl;
70 76
71 // Creates |copy_texture_to_impl_| if NULL. 77 // Creates |copy_texture_to_impl_| if NULL.
72 void InitCopyTextToImpl(); 78 void InitCopyTextToImpl();
73 79
74 WebKit::WebGraphicsContext3D* context_; 80 WebKit::WebGraphicsContext3D* context_;
75 WebKit::WebGraphicsContext3D* context_for_thread_; 81 WebKit::WebGraphicsContext3D* context_for_thread_;
76 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; 82 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_;
77 83
78 // The number of all GLHelper instances. 84 // The number of all GLHelper instances.
79 static base::subtle::Atomic32 count_; 85 static base::subtle::Atomic32 count_;
80 86
81 DISALLOW_COPY_AND_ASSIGN(GLHelper); 87 DISALLOW_COPY_AND_ASSIGN(GLHelper);
82 }; 88 };
83 89
84 } // namespace content 90 } // namespace content
85 91
86 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 92 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698