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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 133363004: content_gl_tests should skip RGB565 test if the prior detection of format support fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize variables before operating getintegerv Created 6 years, 11 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
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/browser/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 bool CompositorImpl::CopyTextureToBitmap(GLuint texture_id, 340 bool CompositorImpl::CopyTextureToBitmap(GLuint texture_id,
341 const gfx::Rect& sub_rect, 341 const gfx::Rect& sub_rect,
342 gfx::JavaBitmap& bitmap) { 342 gfx::JavaBitmap& bitmap) {
343 // The sub_rect should match the bitmap size. 343 // The sub_rect should match the bitmap size.
344 DCHECK(bitmap.size() == sub_rect.size()); 344 DCHECK(bitmap.size() == sub_rect.size());
345 if (bitmap.size() != sub_rect.size() || texture_id == 0) return false; 345 if (bitmap.size() != sub_rect.size() || texture_id == 0) return false;
346 346
347 GLHelper* helper = ImageTransportFactoryAndroid::GetInstance()->GetGLHelper(); 347 GLHelper* helper = ImageTransportFactoryAndroid::GetInstance()->GetGLHelper();
348 helper->ReadbackTextureSync(texture_id, 348 helper->ReadbackTextureSync(texture_id,
349 sub_rect, 349 sub_rect,
350 static_cast<unsigned char*> (bitmap.pixels())); 350 static_cast<unsigned char*> (bitmap.pixels()),
351 SkBitmap::kARGB_8888_Config);
351 return true; 352 return true;
352 } 353 }
353 354
354 static scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 355 static scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
355 CreateGpuProcessViewContext( 356 CreateGpuProcessViewContext(
356 const blink::WebGraphicsContext3D::Attributes attributes, 357 const blink::WebGraphicsContext3D::Attributes attributes,
357 int surface_id) { 358 int surface_id) {
358 BrowserGpuChannelHostFactory* factory = 359 BrowserGpuChannelHostFactory* factory =
359 BrowserGpuChannelHostFactory::instance(); 360 BrowserGpuChannelHostFactory::instance();
360 CauseForGpuLaunch cause = 361 CauseForGpuLaunch cause =
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 default: 488 default:
488 return GL_UNSIGNED_SHORT_5_6_5; 489 return GL_UNSIGNED_SHORT_5_6_5;
489 } 490 }
490 } 491 }
491 492
492 void CompositorImpl::DidCommit() { 493 void CompositorImpl::DidCommit() {
493 root_window_->OnCompositingDidCommit(); 494 root_window_->OnCompositingDidCommit();
494 } 495 }
495 496
496 } // namespace content 497 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698