OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011, Google Inc. | 2 * Copyright 2011, 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 DLOG(INFO) << "RendererCairo entering fullscreen"; | 499 DLOG(INFO) << "RendererCairo entering fullscreen"; |
500 #if defined(OS_LINUX) | 500 #if defined(OS_LINUX) |
501 const DisplayWindowLinux &display_platform = | 501 const DisplayWindowLinux &display_platform = |
502 static_cast<const DisplayWindowLinux&>(display); | 502 static_cast<const DisplayWindowLinux&>(display); |
503 display_ = display_platform.display(); | 503 display_ = display_platform.display(); |
504 window_ = display_platform.window(); | 504 window_ = display_platform.window(); |
505 XWindowAttributes window_attributes; | 505 XWindowAttributes window_attributes; |
506 if (XGetWindowAttributes(display_, window_, &window_attributes)) { | 506 if (XGetWindowAttributes(display_, window_, &window_attributes)) { |
507 fullscreen_ = true; | 507 fullscreen_ = true; |
508 SetClientSize(window_attributes.width, window_attributes.height); | 508 SetClientSize(window_attributes.width, window_attributes.height); |
509 DestroyCairoSurface(); | 509 DestroyDisplaySurface(); |
510 CreateCairoSurface(); | 510 CreateDisplaySurface(); |
511 } | 511 } |
512 #elif defined(OS_WIN) | 512 #elif defined(OS_WIN) |
513 DEVMODE dev_mode; | 513 DEVMODE dev_mode; |
514 if (hwnd_ != NULL && | 514 if (hwnd_ != NULL && |
515 EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode)) { | 515 EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode)) { |
516 int width = dev_mode.dmPelsWidth; | 516 int width = dev_mode.dmPelsWidth; |
517 int height = dev_mode.dmPelsHeight; | 517 int height = dev_mode.dmPelsHeight; |
518 | 518 |
519 fullscreen_ = true; | 519 fullscreen_ = true; |
520 Resize(width, height); | 520 Resize(width, height); |
(...skipping 16 matching lines...) Expand all Loading... |
537 if (fullscreen_) { | 537 if (fullscreen_) { |
538 DLOG(INFO) << "RendererCairo exiting fullscreen"; | 538 DLOG(INFO) << "RendererCairo exiting fullscreen"; |
539 #if defined(OS_LINUX) | 539 #if defined(OS_LINUX) |
540 const DisplayWindowLinux &display_platform = | 540 const DisplayWindowLinux &display_platform = |
541 static_cast<const DisplayWindowLinux&>(display); | 541 static_cast<const DisplayWindowLinux&>(display); |
542 display_ = display_platform.display(); | 542 display_ = display_platform.display(); |
543 window_ = display_platform.window(); | 543 window_ = display_platform.window(); |
544 | 544 |
545 fullscreen_ = false; | 545 fullscreen_ = false; |
546 SetClientSize(width, height); | 546 SetClientSize(width, height); |
547 DestroyCairoSurface(); | 547 DestroyDisplaySurface(); |
548 CreateCairoSurface(); | 548 CreateDisplaySurface(); |
549 #elif defined(OS_WIN) | 549 #elif defined(OS_WIN) |
550 if (hwnd_ == NULL) { | 550 if (hwnd_ == NULL) { |
551 // Not initialized. | 551 // Not initialized. |
552 return false; | 552 return false; |
553 } | 553 } |
554 fullscreen_ = false; | 554 fullscreen_ = false; |
555 Resize(width, height); | 555 Resize(width, height); |
556 #endif | 556 #endif |
557 } | 557 } |
558 return true; | 558 return true; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 NOTIMPLEMENTED(); | 687 NOTIMPLEMENTED(); |
688 } | 688 } |
689 | 689 |
690 void RendererCairo::PopRenderStates() { | 690 void RendererCairo::PopRenderStates() { |
691 NOTIMPLEMENTED(); | 691 NOTIMPLEMENTED(); |
692 } | 692 } |
693 | 693 |
694 } // namespace o2d | 694 } // namespace o2d |
695 | 695 |
696 } // namespace o3d | 696 } // namespace o3d |
OLD | NEW |