OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 5 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 gl_surface_->SwapBuffers(); | 328 gl_surface_->SwapBuffers(); |
329 } else if (!render_directly_to_web_view_) { | 329 } else if (!render_directly_to_web_view_) { |
330 // We need to prepare our rendering results for the compositor. | 330 // We need to prepare our rendering results for the compositor. |
331 makeContextCurrent(); | 331 makeContextCurrent(); |
332 ResolveMultisampledFramebuffer(0, 0, cached_width_, cached_height_); | 332 ResolveMultisampledFramebuffer(0, 0, cached_width_, cached_height_); |
333 } | 333 } |
334 } | 334 } |
335 | 335 |
336 void WebGraphicsContext3DInProcessImpl::postSubBufferCHROMIUM( | 336 void WebGraphicsContext3DInProcessImpl::postSubBufferCHROMIUM( |
337 int x, int y, int width, int height) { | 337 int x, int y, int width, int height) { |
338 DCHECK(gl_surface_->SupportsPostSubBuffer()); | 338 DCHECK(gl_context_->HasExtension("GL_CHROMIUM_post_sub_buffer")); |
339 gl_surface_->PostSubBuffer(x, y, width, height); | 339 gl_surface_->PostSubBuffer(x, y, width, height); |
340 } | 340 } |
341 | 341 |
342 namespace { | 342 namespace { |
343 | 343 |
344 int CreateTextureObject(GLenum target) { | 344 int CreateTextureObject(GLenum target) { |
345 GLuint texture = 0; | 345 GLuint texture = 0; |
346 glGenTextures(1, &texture); | 346 glGenTextures(1, &texture); |
347 glBindTexture(target, texture); | 347 glBindTexture(target, texture); |
348 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); | 348 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 if (length > 1) { | 1690 if (length > 1) { |
1691 entry->translated_source.reset(new char[length]); | 1691 entry->translated_source.reset(new char[length]); |
1692 ShGetObjectCode(compiler, entry->translated_source.get()); | 1692 ShGetObjectCode(compiler, entry->translated_source.get()); |
1693 } | 1693 } |
1694 entry->is_valid = true; | 1694 entry->is_valid = true; |
1695 return true; | 1695 return true; |
1696 } | 1696 } |
1697 | 1697 |
1698 } // namespace gpu | 1698 } // namespace gpu |
1699 } // namespace webkit | 1699 } // namespace webkit |
OLD | NEW |