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

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

Issue 15688002: Part 1/3 (compositor) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Android build Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 if (must_restore_fbo) 336 if (must_restore_fbo)
337 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, bound_fbo_); 337 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, bound_fbo_);
338 338
339 if (scanline_) { 339 if (scanline_) {
340 delete[] scanline_; 340 delete[] scanline_;
341 scanline_ = 0; 341 scanline_ = 0;
342 } 342 }
343 scanline_ = new unsigned char[width * 4]; 343 scanline_ = new unsigned char[width * 4];
344 } 344 }
345 345
346 void WebGraphicsContext3DInProcessImpl::reshapeWithScaleFactor(
347 int width, int height, float scaleFactor) {
348 reshape(width, height);
349 }
350
346 bool WebGraphicsContext3DInProcessImpl::AllocateOffscreenFrameBuffer( 351 bool WebGraphicsContext3DInProcessImpl::AllocateOffscreenFrameBuffer(
347 int width, int height) { 352 int width, int height) {
348 GLenum target = GL_TEXTURE_2D; 353 GLenum target = GL_TEXTURE_2D;
349 354
350 if (!texture_) { 355 if (!texture_) {
351 // Generate the texture object 356 // Generate the texture object
352 texture_ = CreateTextureObject(target); 357 texture_ = CreateTextureObject(target);
353 // Generate the framebuffer object 358 // Generate the framebuffer object
354 glGenFramebuffersEXT(1, &fbo_); 359 glGenFramebuffersEXT(1, &fbo_);
355 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_); 360 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_);
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 if (length > 1) { 1804 if (length > 1) {
1800 entry->translated_source.reset(new char[length]); 1805 entry->translated_source.reset(new char[length]);
1801 ShGetObjectCode(compiler, entry->translated_source.get()); 1806 ShGetObjectCode(compiler, entry->translated_source.get());
1802 } 1807 }
1803 entry->is_valid = true; 1808 entry->is_valid = true;
1804 return true; 1809 return true;
1805 } 1810 }
1806 1811
1807 } // namespace gpu 1812 } // namespace gpu
1808 } // namespace webkit 1813 } // 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