Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.cc

Issue 7890046: Command to mark surface inactive, so gpu process can release resources. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: final rebase and added comments Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 if (isScissorEnabled) 587 if (isScissorEnabled)
588 glEnable(GL_SCISSOR_TEST); 588 glEnable(GL_SCISSOR_TEST);
589 else 589 else
590 glDisable(GL_SCISSOR_TEST); 590 glDisable(GL_SCISSOR_TEST);
591 if (isDitherEnabled) 591 if (isDitherEnabled)
592 glEnable(GL_DITHER); 592 glEnable(GL_DITHER);
593 else 593 else
594 glDisable(GL_DITHER); 594 glDisable(GL_DITHER);
595 } 595 }
596 596
597 void WebGraphicsContext3DInProcessImpl::setVisibility(bool visible) {
598 }
599
597 #ifdef FLIP_FRAMEBUFFER_VERTICALLY 600 #ifdef FLIP_FRAMEBUFFER_VERTICALLY
598 void WebGraphicsContext3DInProcessImpl::FlipVertically( 601 void WebGraphicsContext3DInProcessImpl::FlipVertically(
599 unsigned char* framebuffer, unsigned int width, unsigned int height) { 602 unsigned char* framebuffer, unsigned int width, unsigned int height) {
600 unsigned char* scanline = scanline_; 603 unsigned char* scanline = scanline_;
601 if (!scanline) 604 if (!scanline)
602 return; 605 return;
603 unsigned int row_bytes = width * 4; 606 unsigned int row_bytes = width * 4;
604 unsigned int count = height / 2; 607 unsigned int count = height / 2;
605 for (unsigned int i = 0; i < count; i++) { 608 for (unsigned int i = 0; i < count; i++) {
606 unsigned char* row_a = framebuffer + i * row_bytes; 609 unsigned char* row_a = framebuffer + i * row_bytes;
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 if (length > 1) { 1673 if (length > 1) {
1671 entry->translated_source.reset(new char[length]); 1674 entry->translated_source.reset(new char[length]);
1672 ShGetObjectCode(compiler, entry->translated_source.get()); 1675 ShGetObjectCode(compiler, entry->translated_source.get());
1673 } 1676 }
1674 entry->is_valid = true; 1677 entry->is_valid = true;
1675 return true; 1678 return true;
1676 } 1679 }
1677 1680
1678 } // namespace gpu 1681 } // namespace gpu
1679 } // namespace webkit 1682 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698