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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 15685003: Part 2/3 (GL) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-resolve against head 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 | « no previous file | content/common/gpu/image_transport_surface.h » ('j') | 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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #ifndef GL_GLEXT_PROTOTYPES 8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES 1 9 #define GL_GLEXT_PROTOTYPES 1
10 #endif 10 #endif
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) { 569 void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) {
570 reshapeWithScaleFactor(width, height, 1.f); 570 reshapeWithScaleFactor(width, height, 1.f);
571 } 571 }
572 572
573 void WebGraphicsContext3DCommandBufferImpl::reshapeWithScaleFactor( 573 void WebGraphicsContext3DCommandBufferImpl::reshapeWithScaleFactor(
574 int width, int height, float scale_factor) { 574 int width, int height, float scale_factor) {
575 cached_width_ = width; 575 cached_width_ = width;
576 cached_height_ = height; 576 cached_height_ = height;
577 577
578 gl_->ResizeCHROMIUM(width, height); 578 gl_->ResizeCHROMIUM(width, height, scale_factor);
579 } 579 }
580 580
581 void WebGraphicsContext3DCommandBufferImpl::FlipVertically( 581 void WebGraphicsContext3DCommandBufferImpl::FlipVertically(
582 uint8* framebuffer, 582 uint8* framebuffer,
583 unsigned int width, 583 unsigned int width,
584 unsigned int height) { 584 unsigned int height) {
585 if (width == 0) 585 if (width == 0)
586 return; 586 return;
587 scanline_.resize(width * 4); 587 scanline_.resize(width * 4);
588 uint8* scanline = &scanline_[0]; 588 uint8* scanline = &scanline_[0];
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 1739
1740 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1740 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1741 const std::string& message, int id) { 1741 const std::string& message, int id) {
1742 if (error_message_callback_) { 1742 if (error_message_callback_) {
1743 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1743 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1744 error_message_callback_->onErrorMessage(str, id); 1744 error_message_callback_->onErrorMessage(str, id);
1745 } 1745 }
1746 } 1746 }
1747 1747
1748 } // namespace content 1748 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698