Chromium Code Reviews| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 558 | 558 |
| 559 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 559 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
| 560 if (scanline_) { | 560 if (scanline_) { |
| 561 delete[] scanline_; | 561 delete[] scanline_; |
| 562 scanline_ = 0; | 562 scanline_ = 0; |
| 563 } | 563 } |
| 564 scanline_ = new unsigned char[width * 4]; | 564 scanline_ = new unsigned char[width * 4]; |
| 565 #endif // FLIP_FRAMEBUFFER_VERTICALLY | 565 #endif // FLIP_FRAMEBUFFER_VERTICALLY |
| 566 } | 566 } |
| 567 | 567 |
| 568 void WebGraphicsContext3DInProcessImpl::setVisibility(bool visible) { | |
| 569 NOTREACHED(); | |
|
jonathan.backer
2011/10/07 15:48:37
Probably will be reached on DumpRenderTree.
| |
| 570 } | |
| 571 | |
| 568 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 572 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
| 569 void WebGraphicsContext3DInProcessImpl::FlipVertically( | 573 void WebGraphicsContext3DInProcessImpl::FlipVertically( |
| 570 unsigned char* framebuffer, unsigned int width, unsigned int height) { | 574 unsigned char* framebuffer, unsigned int width, unsigned int height) { |
| 571 unsigned char* scanline = scanline_; | 575 unsigned char* scanline = scanline_; |
| 572 if (!scanline) | 576 if (!scanline) |
| 573 return; | 577 return; |
| 574 unsigned int row_bytes = width * 4; | 578 unsigned int row_bytes = width * 4; |
| 575 unsigned int count = height / 2; | 579 unsigned int count = height / 2; |
| 576 for (unsigned int i = 0; i < count; i++) { | 580 for (unsigned int i = 0; i < count; i++) { |
| 577 unsigned char* row_a = framebuffer + i * row_bytes; | 581 unsigned char* row_a = framebuffer + i * row_bytes; |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1630 if (length > 1) { | 1634 if (length > 1) { |
| 1631 entry->translated_source.reset(new char[length]); | 1635 entry->translated_source.reset(new char[length]); |
| 1632 ShGetObjectCode(compiler, entry->translated_source.get()); | 1636 ShGetObjectCode(compiler, entry->translated_source.get()); |
| 1633 } | 1637 } |
| 1634 entry->is_valid = true; | 1638 entry->is_valid = true; |
| 1635 return true; | 1639 return true; |
| 1636 } | 1640 } |
| 1637 | 1641 |
| 1638 } // namespace gpu | 1642 } // namespace gpu |
| 1639 } // namespace webkit | 1643 } // namespace webkit |
| OLD | NEW |