OLD | NEW |
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 "gpu/blink/webgraphicscontext3d_impl.h" | 5 #include "gpu/blink/webgraphicscontext3d_impl.h" |
6 | 6 |
7 #include "base/atomicops.h" | 7 #include "base/atomicops.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "gpu/GLES2/gl2extchromium.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 bool WebGraphicsContext3DImpl::insertSyncPoint(WGC3Dbyte* sync_token) { | 216 bool WebGraphicsContext3DImpl::insertSyncPoint(WGC3Dbyte* sync_token) { |
217 const uint32_t sync_point = gl_->InsertSyncPointCHROMIUM(); | 217 const uint32_t sync_point = gl_->InsertSyncPointCHROMIUM(); |
218 if (!sync_point) | 218 if (!sync_point) |
219 return false; | 219 return false; |
220 | 220 |
221 gpu::SyncToken sync_token_data(sync_point); | 221 gpu::SyncToken sync_token_data(sync_point); |
222 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); | 222 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); |
223 return true; | 223 return true; |
224 } | 224 } |
225 | 225 |
226 DELEGATE_TO_GL_3(reshapeWithScaleFactor, ResizeCHROMIUM, int, int, float) | 226 void WebGraphicsContext3DImpl::reshapeWithScaleFactor(int width, |
| 227 int height, |
| 228 float scale) { |
| 229 gl_->ResizeCHROMIUM(width, height, scale, true); |
| 230 } |
227 | 231 |
228 DELEGATE_TO_GL_4R(mapBufferSubDataCHROMIUM, MapBufferSubDataCHROMIUM, WGC3Denum, | 232 DELEGATE_TO_GL_4R(mapBufferSubDataCHROMIUM, MapBufferSubDataCHROMIUM, WGC3Denum, |
229 WGC3Dintptr, WGC3Dsizeiptr, WGC3Denum, void*) | 233 WGC3Dintptr, WGC3Dsizeiptr, WGC3Denum, void*) |
230 | 234 |
231 DELEGATE_TO_GL_1(unmapBufferSubDataCHROMIUM, UnmapBufferSubDataCHROMIUM, | 235 DELEGATE_TO_GL_1(unmapBufferSubDataCHROMIUM, UnmapBufferSubDataCHROMIUM, |
232 const void*) | 236 const void*) |
233 | 237 |
234 DELEGATE_TO_GL_9R(mapTexSubImage2DCHROMIUM, MapTexSubImage2DCHROMIUM, WGC3Denum, | 238 DELEGATE_TO_GL_9R(mapTexSubImage2DCHROMIUM, MapTexSubImage2DCHROMIUM, WGC3Denum, |
235 WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei, | 239 WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei, |
236 WGC3Denum, WGC3Denum, WGC3Denum, void*) | 240 WGC3Denum, WGC3Denum, WGC3Denum, void*) |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; | 1287 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; |
1284 break; | 1288 break; |
1285 default: | 1289 default: |
1286 NOTREACHED(); | 1290 NOTREACHED(); |
1287 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; | 1291 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; |
1288 break; | 1292 break; |
1289 } | 1293 } |
1290 } | 1294 } |
1291 | 1295 |
1292 } // namespace gpu_blink | 1296 } // namespace gpu_blink |
OLD | NEW |