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

Side by Side Diff: chrome/browser/gpu_process_host_ui_shim.cc

Issue 6588138: Implemented multisampling control in software rendering list. Move prelimina... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 // TODO(jam): move this file to src/content once we have an interface that the 1 // TODO(jam): move this file to src/content once we have an interface that the
2 // embedder provides. We can then use it to get the resource and resize the 2 // embedder provides. We can then use it to get the resource and resize the
3 // window. 3 // window.
4 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 4 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be 5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file. 6 // found in the LICENSE file.
7 7
8 #include "chrome/browser/gpu_process_host_ui_shim.h" 8 #include "chrome/browser/gpu_process_host_ui_shim.h"
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) 374 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message)
375 IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, 375 IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished,
376 OnChannelEstablished) 376 OnChannelEstablished)
377 IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated, 377 IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated,
378 OnCommandBufferCreated) 378 OnCommandBufferCreated)
379 IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer, 379 IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer,
380 OnDestroyCommandBuffer) 380 OnDestroyCommandBuffer)
381 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected, 381 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected,
382 OnGraphicsInfoCollected) 382 OnGraphicsInfoCollected)
383 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_PreliminaryGraphicsInfoCollected,
384 OnPreliminaryGraphicsInfoCollected)
385 IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage, 383 IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage,
386 OnLogMessage) 384 OnLogMessage)
387 IPC_MESSAGE_HANDLER(GpuHostMsg_SynchronizeReply, 385 IPC_MESSAGE_HANDLER(GpuHostMsg_SynchronizeReply,
388 OnSynchronizeReply) 386 OnSynchronizeReply)
389 #if defined(OS_LINUX) && !defined(TOUCH_UI) 387 #if defined(OS_LINUX) && !defined(TOUCH_UI)
390 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_ResizeXID, OnResizeXID) 388 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_ResizeXID, OnResizeXID)
391 #elif defined(OS_MACOSX) 389 #elif defined(OS_MACOSX)
392 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSetIOSurface, 390 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSetIOSurface,
393 OnAcceleratedSurfaceSetIOSurface) 391 OnAcceleratedSurfaceSetIOSurface)
394 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, 392 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 gfx::PluginWindowHandle window, int32 renderer_id, 453 gfx::PluginWindowHandle window, int32 renderer_id,
456 int32 render_view_id) { 454 int32 render_view_id) {
457 ViewID view_id(renderer_id, render_view_id); 455 ViewID view_id(renderer_id, render_view_id);
458 acquired_surfaces_.erase(view_id); 456 acquired_surfaces_.erase(view_id);
459 } 457 }
460 458
461 void GpuProcessHostUIShim::OnGraphicsInfoCollected(const GPUInfo& gpu_info) { 459 void GpuProcessHostUIShim::OnGraphicsInfoCollected(const GPUInfo& gpu_info) {
462 gpu_data_manager_->UpdateGpuInfo(gpu_info); 460 gpu_data_manager_->UpdateGpuInfo(gpu_info);
463 } 461 }
464 462
465 void GpuProcessHostUIShim::OnPreliminaryGraphicsInfoCollected(
466 const GPUInfo& gpu_info, IPC::Message* reply_msg) {
467 gpu_data_manager_->UpdateGpuInfo(gpu_info);
468 GpuFeatureFlags flags = gpu_data_manager_->GetGpuFeatureFlags();
469
470 GpuHostMsg_PreliminaryGraphicsInfoCollected::WriteReplyParams(
471 reply_msg, flags.flags() != 0);
472 Send(reply_msg);
473 }
474
475 void GpuProcessHostUIShim::OnLogMessage(int level, 463 void GpuProcessHostUIShim::OnLogMessage(int level,
476 const std::string& header, 464 const std::string& header,
477 const std::string& message) { 465 const std::string& message) {
478 DictionaryValue* dict = new DictionaryValue(); 466 DictionaryValue* dict = new DictionaryValue();
479 dict->SetInteger("level", level); 467 dict->SetInteger("level", level);
480 dict->SetString("header", header); 468 dict->SetString("header", header);
481 dict->SetString("message", message); 469 dict->SetString("message", message);
482 log_messages_.Append(dict); 470 log_messages_.Append(dict);
483 } 471 }
484 472
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 RenderViewHost* host = RenderViewHost::FromID(renderer_id, 529 RenderViewHost* host = RenderViewHost::FromID(renderer_id,
542 render_view_id); 530 render_view_id);
543 if (!host) { 531 if (!host) {
544 return; 532 return;
545 } 533 }
546 host->ScheduleComposite(); 534 host->ScheduleComposite();
547 } 535 }
548 536
549 #endif 537 #endif
550 538
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698