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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_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
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_command_buffer_impl.h" 5 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 context_->SwapBuffers(); 936 context_->SwapBuffers();
937 } 937 }
938 938
939 void WebGraphicsContext3DInProcessCommandBufferImpl::postSubBufferCHROMIUM( 939 void WebGraphicsContext3DInProcessCommandBufferImpl::postSubBufferCHROMIUM(
940 int x, int y, int width, int height) { 940 int x, int y, int width, int height) {
941 gl_->PostSubBufferCHROMIUM(x, y, width, height); 941 gl_->PostSubBufferCHROMIUM(x, y, width, height);
942 } 942 }
943 943
944 void WebGraphicsContext3DInProcessCommandBufferImpl::reshape( 944 void WebGraphicsContext3DInProcessCommandBufferImpl::reshape(
945 int width, int height) { 945 int width, int height) {
946 reshapeWithScaleFactor(width, height, 1.0f);
947 }
948
949 void WebGraphicsContext3DInProcessCommandBufferImpl::reshapeWithScaleFactor(
950 int width, int height, float scale_factor) {
946 cached_width_ = width; 951 cached_width_ = width;
947 cached_height_ = height; 952 cached_height_ = height;
948 953
949 // TODO(gmam): See if we can comment this in. 954 // TODO(gmam): See if we can comment this in.
950 // ClearContext(); 955 // ClearContext();
951 956
952 gl_->ResizeCHROMIUM(width, height); 957 gl_->ResizeCHROMIUM(width, height);
953 } 958 }
954 959
955 WebGLId WebGraphicsContext3DInProcessCommandBufferImpl::createCompositorTexture( 960 WebGLId WebGraphicsContext3DInProcessCommandBufferImpl::createCompositorTexture(
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM, 1985 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM,
1981 WGC3Denum) 1986 WGC3Denum)
1982 1987
1983 void WebGraphicsContext3DInProcessCommandBufferImpl::SetGpuMemoryBufferCreator( 1988 void WebGraphicsContext3DInProcessCommandBufferImpl::SetGpuMemoryBufferCreator(
1984 GpuMemoryBufferCreator* creator) { 1989 GpuMemoryBufferCreator* creator) {
1985 g_gpu_memory_buffer_creator = creator; 1990 g_gpu_memory_buffer_creator = creator;
1986 } 1991 }
1987 1992
1988 } // namespace gpu 1993 } // namespace gpu
1989 } // namespace webkit 1994 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h ('k') | webkit/gpu/webgraphicscontext3d_in_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698