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

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

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming messages. Updated the other platforms. Created 8 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 "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/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease( 654 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease(
655 uint64 surface_handle) { 655 uint64 surface_handle) {
656 if (current_surface_ == surface_handle) { 656 if (current_surface_ == surface_handle) {
657 current_surface_ = 0; 657 current_surface_ = 0;
658 UpdateExternalTexture(); 658 UpdateExternalTexture();
659 } 659 }
660 image_transport_clients_.erase(surface_handle); 660 image_transport_clients_.erase(surface_handle);
661 } 661 }
662 662
663 void RenderWidgetHostViewAura::AcceleratedSurfaceSuggestDiscard(
664 uint64 surface_handle, int32 route_id, int gpu_host_id) {
665 if (host_->IsVisible() && current_surface_ == surface_handle)
666 return;
piman 2012/05/04 00:03:49 The problem here is that it's racy. We may miss an
mmocny 2012/05/04 18:55:52 Very sorry, but I am still not understanding why t
667
668 AcceleratedSurfaceRelease(surface_handle);
669
670 on_compositing_ended_callbacks_.push_back(
piman 2012/05/04 00:03:49 on_compositing_ended_callbacks_ may not be used un
mmocny 2012/05/04 18:55:52 Once I stop scheduling a composite, Yes, I'll need
671 base::Bind(&RenderWidgetHostImpl::SendSurfaceDiscard,
piman 2012/05/04 00:03:49 By the time that callback is called, we may be vis
mmocny 2012/05/04 18:55:52 Correct, thanks! On 2012/05/04 00:03:49, piman wro
672 surface_handle,
673 route_id,
674 gpu_host_id));
675 host_->ScheduleComposite();
piman 2012/05/04 00:03:49 This shouldn't be needed. If we don't have a frame
676 }
677
663 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { 678 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) {
664 content::RenderWidgetHostViewBase::SetBackground(background); 679 content::RenderWidgetHostViewBase::SetBackground(background);
665 host_->SetBackground(background); 680 host_->SetBackground(background);
666 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); 681 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque());
667 } 682 }
668 683
669 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) { 684 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) {
670 GetScreenInfoForWindow(results, window_); 685 GetScreenInfoForWindow(results, window_);
671 } 686 }
672 687
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( 1330 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
1316 RenderWidgetHost* widget) { 1331 RenderWidgetHost* widget) {
1317 return new RenderWidgetHostViewAura(widget); 1332 return new RenderWidgetHostViewAura(widget);
1318 } 1333 }
1319 1334
1320 // static 1335 // static
1321 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( 1336 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
1322 WebKit::WebScreenInfo* results) { 1337 WebKit::WebScreenInfo* results) {
1323 GetScreenInfoForWindow(results, NULL); 1338 GetScreenInfoForWindow(results, NULL);
1324 } 1339 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698