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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 void WebGraphicsContext3DInProcessImpl::prepareTexture() { | 326 void WebGraphicsContext3DInProcessImpl::prepareTexture() { |
327 if (window_ != gfx::kNullPluginWindow) { | 327 if (window_ != gfx::kNullPluginWindow) { |
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( |
| 337 int x, int y, int width, int height) { |
| 338 DCHECK(gl_surface_->SupportsPostSubBuffer()); |
| 339 gl_surface_->PostSubBuffer(x, y, width, height); |
| 340 } |
| 341 |
336 namespace { | 342 namespace { |
337 | 343 |
338 int CreateTextureObject(GLenum target) { | 344 int CreateTextureObject(GLenum target) { |
339 GLuint texture = 0; | 345 GLuint texture = 0; |
340 glGenTextures(1, &texture); | 346 glGenTextures(1, &texture); |
341 glBindTexture(target, texture); | 347 glBindTexture(target, texture); |
342 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); | 348 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); |
343 glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); | 349 glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); |
344 return texture; | 350 return texture; |
345 } | 351 } |
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 if (length > 1) { | 1682 if (length > 1) { |
1677 entry->translated_source.reset(new char[length]); | 1683 entry->translated_source.reset(new char[length]); |
1678 ShGetObjectCode(compiler, entry->translated_source.get()); | 1684 ShGetObjectCode(compiler, entry->translated_source.get()); |
1679 } | 1685 } |
1680 entry->is_valid = true; | 1686 entry->is_valid = true; |
1681 return true; | 1687 return true; |
1682 } | 1688 } |
1683 | 1689 |
1684 } // namespace gpu | 1690 } // namespace gpu |
1685 } // namespace webkit | 1691 } // namespace webkit |
OLD | NEW |