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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 if (isScissorEnabled) | 581 if (isScissorEnabled) |
582 glEnable(GL_SCISSOR_TEST); | 582 glEnable(GL_SCISSOR_TEST); |
583 else | 583 else |
584 glDisable(GL_SCISSOR_TEST); | 584 glDisable(GL_SCISSOR_TEST); |
585 if (isDitherEnabled) | 585 if (isDitherEnabled) |
586 glEnable(GL_DITHER); | 586 glEnable(GL_DITHER); |
587 else | 587 else |
588 glDisable(GL_DITHER); | 588 glDisable(GL_DITHER); |
589 } | 589 } |
590 | 590 |
| 591 void WebGraphicsContext3DInProcessImpl::setVisibility(bool visible) { |
| 592 } |
| 593 |
591 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 594 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
592 void WebGraphicsContext3DInProcessImpl::FlipVertically( | 595 void WebGraphicsContext3DInProcessImpl::FlipVertically( |
593 unsigned char* framebuffer, unsigned int width, unsigned int height) { | 596 unsigned char* framebuffer, unsigned int width, unsigned int height) { |
594 unsigned char* scanline = scanline_; | 597 unsigned char* scanline = scanline_; |
595 if (!scanline) | 598 if (!scanline) |
596 return; | 599 return; |
597 unsigned int row_bytes = width * 4; | 600 unsigned int row_bytes = width * 4; |
598 unsigned int count = height / 2; | 601 unsigned int count = height / 2; |
599 for (unsigned int i = 0; i < count; i++) { | 602 for (unsigned int i = 0; i < count; i++) { |
600 unsigned char* row_a = framebuffer + i * row_bytes; | 603 unsigned char* row_a = framebuffer + i * row_bytes; |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 if (length > 1) { | 1667 if (length > 1) { |
1665 entry->translated_source.reset(new char[length]); | 1668 entry->translated_source.reset(new char[length]); |
1666 ShGetObjectCode(compiler, entry->translated_source.get()); | 1669 ShGetObjectCode(compiler, entry->translated_source.get()); |
1667 } | 1670 } |
1668 entry->is_valid = true; | 1671 entry->is_valid = true; |
1669 return true; | 1672 return true; |
1670 } | 1673 } |
1671 | 1674 |
1672 } // namespace gpu | 1675 } // namespace gpu |
1673 } // namespace webkit | 1676 } // namespace webkit |
OLD | NEW |