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

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: minor cleanup Created 8 years, 8 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/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/renderer_host/backing_store_skia.h" 10 #include "content/browser/renderer_host/backing_store_skia.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 gfx::Size(width, height), surface_handle)); 550 gfx::Size(width, height), surface_handle));
551 if (!surface) { 551 if (!surface) {
552 LOG(ERROR) << "Failed to create ImageTransportClient"; 552 LOG(ERROR) << "Failed to create ImageTransportClient";
553 return; 553 return;
554 } 554 }
555 *shm_handle = surface->Handle(); 555 *shm_handle = surface->Handle();
556 556
557 image_transport_clients_[*surface_handle] = surface; 557 image_transport_clients_[*surface_handle] = surface;
558 } 558 }
559 559
560 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease( 560 bool RenderWidgetHostViewAura::AcceleratedSurfaceRelease(
561 uint64 surface_handle) { 561 uint64 surface_handle) {
562 if (host_->IsVisible() && current_surface_ == surface_handle)
563 return false;
562 if (current_surface_ == surface_handle) { 564 if (current_surface_ == surface_handle) {
563 current_surface_ = 0; 565 current_surface_ = 0;
564 UpdateExternalTexture(); 566 UpdateExternalTexture();
565 } 567 }
566 image_transport_clients_.erase(surface_handle); 568 image_transport_clients_.erase(surface_handle);
569 return true;
567 } 570 }
568 571
569 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { 572 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) {
570 content::RenderWidgetHostViewBase::SetBackground(background); 573 content::RenderWidgetHostViewBase::SetBackground(background);
571 host_->SetBackground(background); 574 host_->SetBackground(background);
572 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); 575 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque());
573 } 576 }
574 577
575 bool RenderWidgetHostViewAura::CopyFromCompositingSurface( 578 bool RenderWidgetHostViewAura::CopyFromCompositingSurface(
576 const gfx::Size& size, 579 const gfx::Size& size,
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 WebKit::WebScreenInfo* results) { 1255 WebKit::WebScreenInfo* results) {
1253 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 1256 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize();
1254 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); 1257 results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
1255 results->availableRect = results->rect; 1258 results->availableRect = results->rect;
1256 // TODO(derat): Don't hardcode this? 1259 // TODO(derat): Don't hardcode this?
1257 results->depth = 24; 1260 results->depth = 24;
1258 results->depthPerComponent = 8; 1261 results->depthPerComponent = 8;
1259 results->verticalDPI = 96; 1262 results->verticalDPI = 96;
1260 results->horizontalDPI = 96; 1263 results->horizontalDPI = 96;
1261 } 1264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698