OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 { | 559 { |
560 ASSERT(!m_destructionInProgress); | 560 ASSERT(!m_destructionInProgress); |
561 ASSERT(m_layer); | 561 ASSERT(m_layer); |
562 return m_layer->layer(); | 562 return m_layer->layer(); |
563 } | 563 } |
564 | 564 |
565 void Canvas2DLayerBridge::finalizeFrame(const FloatRect &dirtyRect) | 565 void Canvas2DLayerBridge::finalizeFrame(const FloatRect &dirtyRect) |
566 { | 566 { |
567 ASSERT(!m_destructionInProgress); | 567 ASSERT(!m_destructionInProgress); |
568 Canvas2DLayerManager::get().layerDidDraw(this); | 568 Canvas2DLayerManager::get().layerDidDraw(this); |
569 m_layer->layer()->invalidateRect(dirtyRect); | 569 m_layer->layer()->invalidateRect(enclosingIntRect(dirtyRect)); |
570 m_didRecordDrawCommand = true; | 570 m_didRecordDrawCommand = true; |
571 } | 571 } |
572 | 572 |
573 Platform3DObject Canvas2DLayerBridge::getBackingTexture() | 573 Platform3DObject Canvas2DLayerBridge::getBackingTexture() |
574 { | 574 { |
575 ASSERT(!m_destructionInProgress); | 575 ASSERT(!m_destructionInProgress); |
576 if (!checkSurfaceValid()) | 576 if (!checkSurfaceValid()) |
577 return 0; | 577 return 0; |
578 m_canvas->flush(); | 578 m_canvas->flush(); |
579 context()->flush(); | 579 context()->flush(); |
(...skipping 13 matching lines...) Expand all Loading... |
593 // This copy constructor should only be used for Vector reallocation | 593 // This copy constructor should only be used for Vector reallocation |
594 // Assuming 'other' is to be destroyed, we transfer m_image and | 594 // Assuming 'other' is to be destroyed, we transfer m_image and |
595 // m_parentLayerBridge ownership rather than do a refcount dance. | 595 // m_parentLayerBridge ownership rather than do a refcount dance. |
596 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); | 596 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); |
597 m_image = const_cast<MailboxInfo*>(&other)->m_image.release(); | 597 m_image = const_cast<MailboxInfo*>(&other)->m_image.release(); |
598 m_parentLayerBridge = const_cast<MailboxInfo*>(&other)->m_parentLayerBridge.
release(); | 598 m_parentLayerBridge = const_cast<MailboxInfo*>(&other)->m_parentLayerBridge.
release(); |
599 m_status = other.m_status; | 599 m_status = other.m_status; |
600 } | 600 } |
601 | 601 |
602 } // namespace blink | 602 } // namespace blink |
OLD | NEW |