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

Side by Side Diff: core/cross/client.cc

Issue 5843001: Fix ON_DEMAND_RENDER mode on Mac OSX.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 10 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
« no previous file with comments | « core/cross/client.h ('k') | plugin/linux/main_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if (have_offscreen_surfaces) { 379 if (have_offscreen_surfaces) {
380 renderer_->SetRenderSurfaces(NULL, NULL, false); 380 renderer_->SetRenderSurfaces(NULL, NULL, false);
381 renderer_->FinishRendering(); 381 renderer_->FinishRendering();
382 } 382 }
383 } 383 }
384 384
385 bool Client::IsRendering() { 385 bool Client::IsRendering() {
386 return (renderer_.IsAvailable() && renderer_->rendering()); 386 return (renderer_.IsAvailable() && renderer_->rendering());
387 } 387 }
388 388
389 bool Client::NeedsRender() {
390 return NeedsContinuousRender() || renderer_->need_to_render();
391 }
392
389 bool Client::NeedsContinuousRender() { 393 bool Client::NeedsContinuousRender() {
390 bool needRender = false; 394 bool needRender = false;
391 // Only may happen in RENDERMODE_CONTINUOUS mode. 395 // Only may happen in RENDERMODE_CONTINUOUS mode.
392 if (render_mode() == RENDERMODE_CONTINUOUS) { 396 if (render_mode() == RENDERMODE_CONTINUOUS) {
393 // Always need a draw in normal RENDERMODE_CONTINUOUS mode. 397 // Always need a draw in normal RENDERMODE_CONTINUOUS mode.
394 needRender = true; 398 needRender = true;
395 399
396 if (renderer_.IsAvailable()) { 400 if (renderer_.IsAvailable()) {
397 // If max_fps has been set, only need a draw when "long time no draw". 401 // If max_fps has been set, only need a draw when "long time no draw".
398 int max_fps = renderer_->max_fps(); 402 int max_fps = renderer_->max_fps();
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 } 653 }
650 654
651 String Client::ProfileToString() { 655 String Client::ProfileToString() {
652 StringWriter string_writer(StringWriter::LF); 656 StringWriter string_writer(StringWriter::LF);
653 JsonWriter json_writer(&string_writer, 2); 657 JsonWriter json_writer(&string_writer, 2);
654 profiler_->Write(&json_writer); 658 profiler_->Write(&json_writer);
655 json_writer.Close(); 659 json_writer.Close();
656 return string_writer.ToString(); 660 return string_writer.ToString();
657 } 661 }
658 } // namespace o3d 662 } // namespace o3d
OLDNEW
« no previous file with comments | « core/cross/client.h ('k') | plugin/linux/main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698