| 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 "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 } | 405 } |
| 406 | 406 |
| 407 void RenderWidgetHostImpl::Init() { | 407 void RenderWidgetHostImpl::Init() { |
| 408 DCHECK(process_->HasConnection()); | 408 DCHECK(process_->HasConnection()); |
| 409 | 409 |
| 410 renderer_initialized_ = true; | 410 renderer_initialized_ = true; |
| 411 | 411 |
| 412 GpuSurfaceTracker::Get()->SetSurfaceHandle( | 412 GpuSurfaceTracker::Get()->SetSurfaceHandle( |
| 413 surface_id_, GetCompositingSurface()); | 413 surface_id_, GetCompositingSurface()); |
| 414 | 414 |
| 415 uint32_t surface_id_namespace = 0; |
| 416 if (view_) |
| 417 surface_id_namespace = view_->GetSurfaceIdNamespace(); |
| 418 |
| 415 // Send the ack along with the information on placement. | 419 // Send the ack along with the information on placement. |
| 416 Send(new ViewMsg_CreatingNew_ACK(routing_id_)); | 420 Send(new ViewMsg_CreatingNew_ACK(routing_id_, surface_id_namespace)); |
| 417 GetProcess()->ResumeRequestsForView(routing_id_); | 421 GetProcess()->ResumeRequestsForView(routing_id_); |
| 418 | 422 |
| 419 WasResized(); | 423 WasResized(); |
| 420 } | 424 } |
| 421 | 425 |
| 422 void RenderWidgetHostImpl::InitForFrame() { | 426 void RenderWidgetHostImpl::InitForFrame() { |
| 423 DCHECK(process_->HasConnection()); | 427 DCHECK(process_->HasConnection()); |
| 424 renderer_initialized_ = true; | 428 renderer_initialized_ = true; |
| 425 } | 429 } |
| 426 | 430 |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 } | 2123 } |
| 2120 #endif | 2124 #endif |
| 2121 | 2125 |
| 2122 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2126 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2123 if (view_) | 2127 if (view_) |
| 2124 return view_->PreferredReadbackFormat(); | 2128 return view_->PreferredReadbackFormat(); |
| 2125 return kN32_SkColorType; | 2129 return kN32_SkColorType; |
| 2126 } | 2130 } |
| 2127 | 2131 |
| 2128 } // namespace content | 2132 } // namespace content |
| OLD | NEW |