| 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 if (isScissorEnabled) | 589 if (isScissorEnabled) |
| 590 glEnable(GL_SCISSOR_TEST); | 590 glEnable(GL_SCISSOR_TEST); |
| 591 else | 591 else |
| 592 glDisable(GL_SCISSOR_TEST); | 592 glDisable(GL_SCISSOR_TEST); |
| 593 if (isDitherEnabled) | 593 if (isDitherEnabled) |
| 594 glEnable(GL_DITHER); | 594 glEnable(GL_DITHER); |
| 595 else | 595 else |
| 596 glDisable(GL_DITHER); | 596 glDisable(GL_DITHER); |
| 597 } | 597 } |
| 598 | 598 |
| 599 void WebGraphicsContext3DInProcessImpl::setVisibility(bool visible) { | |
| 600 } | |
| 601 | |
| 602 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 599 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
| 603 void WebGraphicsContext3DInProcessImpl::FlipVertically( | 600 void WebGraphicsContext3DInProcessImpl::FlipVertically( |
| 604 unsigned char* framebuffer, unsigned int width, unsigned int height) { | 601 unsigned char* framebuffer, unsigned int width, unsigned int height) { |
| 605 unsigned char* scanline = scanline_; | 602 unsigned char* scanline = scanline_; |
| 606 if (!scanline) | 603 if (!scanline) |
| 607 return; | 604 return; |
| 608 unsigned int row_bytes = width * 4; | 605 unsigned int row_bytes = width * 4; |
| 609 unsigned int count = height / 2; | 606 unsigned int count = height / 2; |
| 610 for (unsigned int i = 0; i < count; i++) { | 607 for (unsigned int i = 0; i < count; i++) { |
| 611 unsigned char* row_a = framebuffer + i * row_bytes; | 608 unsigned char* row_a = framebuffer + i * row_bytes; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, | 703 WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, |
| 707 WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, | 704 WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, |
| 708 WGC3Denum access) { | 705 WGC3Denum access) { |
| 709 return 0; | 706 return 0; |
| 710 } | 707 } |
| 711 | 708 |
| 712 void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM( | 709 void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM( |
| 713 const void* mem) { | 710 const void* mem) { |
| 714 } | 711 } |
| 715 | 712 |
| 713 void WebGraphicsContext3DInProcessImpl::setVisibilityCHROMIUM(bool visible) { |
| 714 } |
| 715 |
| 716 void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM( | 716 void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM( |
| 717 WebGLId id, WebGLId id2) { | 717 WebGLId id, WebGLId id2) { |
| 718 NOTIMPLEMENTED(); | 718 NOTIMPLEMENTED(); |
| 719 } | 719 } |
| 720 | 720 |
| 721 WebString WebGraphicsContext3DInProcessImpl:: | 721 WebString WebGraphicsContext3DInProcessImpl:: |
| 722 getRequestableExtensionsCHROMIUM() { | 722 getRequestableExtensionsCHROMIUM() { |
| 723 return WebString(); | 723 return WebString(); |
| 724 } | 724 } |
| 725 | 725 |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 if (length > 1) { | 1675 if (length > 1) { |
| 1676 entry->translated_source.reset(new char[length]); | 1676 entry->translated_source.reset(new char[length]); |
| 1677 ShGetObjectCode(compiler, entry->translated_source.get()); | 1677 ShGetObjectCode(compiler, entry->translated_source.get()); |
| 1678 } | 1678 } |
| 1679 entry->is_valid = true; | 1679 entry->is_valid = true; |
| 1680 return true; | 1680 return true; |
| 1681 } | 1681 } |
| 1682 | 1682 |
| 1683 } // namespace gpu | 1683 } // namespace gpu |
| 1684 } // namespace webkit | 1684 } // namespace webkit |
| OLD | NEW |