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

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

Issue 117233006: Port content::GLHelper over to GLES2Interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 2598 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 scoped_refptr<ui::Texture> old_texture = old_layer->external_texture(); 2609 scoped_refptr<ui::Texture> old_texture = old_layer->external_texture();
2610 // The new_layer is the one that will be used by our Window, so that's the one 2610 // The new_layer is the one that will be used by our Window, so that's the one
2611 // that should keep our texture. old_layer will be returned to the 2611 // that should keep our texture. old_layer will be returned to the
2612 // RecreateLayer caller, and should have a copy. 2612 // RecreateLayer caller, and should have a copy.
2613 if (old_texture.get()) { 2613 if (old_texture.get()) {
2614 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); 2614 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
2615 GLHelper* gl_helper = factory->GetGLHelper(); 2615 GLHelper* gl_helper = factory->GetGLHelper();
2616 scoped_refptr<ui::Texture> new_texture; 2616 scoped_refptr<ui::Texture> new_texture;
2617 if (host_->is_accelerated_compositing_active() && 2617 if (host_->is_accelerated_compositing_active() &&
2618 gl_helper && current_surface_.get()) { 2618 gl_helper && current_surface_.get()) {
2619 blink::WebGLId texture_id = 2619 GLuint texture_id =
2620 gl_helper->CopyTexture(current_surface_->PrepareTexture(), 2620 gl_helper->CopyTexture(current_surface_->PrepareTexture(),
2621 current_surface_->size()); 2621 current_surface_->size());
2622 if (texture_id) { 2622 if (texture_id) {
2623 new_texture = factory->CreateOwnedTexture( 2623 new_texture = factory->CreateOwnedTexture(
2624 current_surface_->size(), 2624 current_surface_->size(),
2625 current_surface_->device_scale_factor(), texture_id); 2625 current_surface_->device_scale_factor(), texture_id);
2626 } 2626 }
2627 } 2627 }
2628 if (new_texture.get()) 2628 if (new_texture.get())
2629 old_layer->SetExternalTexture(new_texture.get()); 2629 old_layer->SetExternalTexture(new_texture.get());
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 RenderWidgetHost* widget) { 3475 RenderWidgetHost* widget) {
3476 return new RenderWidgetHostViewAura(widget); 3476 return new RenderWidgetHostViewAura(widget);
3477 } 3477 }
3478 3478
3479 // static 3479 // static
3480 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3480 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3481 GetScreenInfoForWindow(results, NULL); 3481 GetScreenInfoForWindow(results, NULL);
3482 } 3482 }
3483 3483
3484 } // namespace content 3484 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698