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

Side by Side Diff: WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

Issue 10633016: Merge r120507 to chromium 1132 branch. (Closed) Base URL: svn://svn.chromium.org/webkit-readonly/branches/chromium/1132/Source/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « WebCore/WebCore.gypi ('k') | WebCore/platform/graphics/chromium/ImageLayerChromium.h » ('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 (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 #include "GraphicsLayerChromium.h" 46 #include "GraphicsLayerChromium.h"
47 47
48 #include "Canvas2DLayerChromium.h" 48 #include "Canvas2DLayerChromium.h"
49 #include "ContentLayerChromium.h" 49 #include "ContentLayerChromium.h"
50 #include "FloatConversion.h" 50 #include "FloatConversion.h"
51 #include "FloatRect.h" 51 #include "FloatRect.h"
52 #include "Image.h" 52 #include "Image.h"
53 #include "ImageLayerChromium.h" 53 #include "ImageLayerChromium.h"
54 #include "LayerChromium.h" 54 #include "LayerChromium.h"
55 #include "NativeImageSkia.h"
55 #include "PlatformString.h" 56 #include "PlatformString.h"
56 #include "SystemTime.h" 57 #include "SystemTime.h"
57 58
58 #include <wtf/CurrentTime.h> 59 #include <wtf/CurrentTime.h>
59 #include <wtf/StringExtras.h> 60 #include <wtf/StringExtras.h>
60 #include <wtf/text/CString.h> 61 #include <wtf/text/CString.h>
61 62
62 using namespace std; 63 using namespace std;
63 64
64 namespace { 65 namespace {
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 { 359 {
359 bool childrenChanged = false; 360 bool childrenChanged = false;
360 if (image) { 361 if (image) {
361 if (!m_contentsLayer.get() || m_contentsLayerPurpose != ContentsLayerFor Image) { 362 if (!m_contentsLayer.get() || m_contentsLayerPurpose != ContentsLayerFor Image) {
362 RefPtr<ImageLayerChromium> imageLayer = ImageLayerChromium::create() ; 363 RefPtr<ImageLayerChromium> imageLayer = ImageLayerChromium::create() ;
363 setupContentsLayer(imageLayer.get()); 364 setupContentsLayer(imageLayer.get());
364 m_contentsLayerPurpose = ContentsLayerForImage; 365 m_contentsLayerPurpose = ContentsLayerForImage;
365 childrenChanged = true; 366 childrenChanged = true;
366 } 367 }
367 ImageLayerChromium* imageLayer = static_cast<ImageLayerChromium*>(m_cont entsLayer.get()); 368 ImageLayerChromium* imageLayer = static_cast<ImageLayerChromium*>(m_cont entsLayer.get());
368 imageLayer->setContents(image); 369 NativeImageSkia* nativeImage = image->nativeImageForCurrentFrame();
370 imageLayer->setBitmap(nativeImage->bitmap());
369 imageLayer->setOpaque(image->isBitmapImage() && !image->currentFrameHasA lpha()); 371 imageLayer->setOpaque(image->isBitmapImage() && !image->currentFrameHasA lpha());
370 updateContentsRect(); 372 updateContentsRect();
371 } else { 373 } else {
372 if (m_contentsLayer) { 374 if (m_contentsLayer) {
373 childrenChanged = true; 375 childrenChanged = true;
374 376
375 // The old contents layer will be removed via updateChildList. 377 // The old contents layer will be removed via updateChildList.
376 m_contentsLayer = 0; 378 m_contentsLayer = 0;
377 } 379 }
378 } 380 }
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 } 767 }
766 768
767 void GraphicsLayerChromium::notifyAnimationFinished(double) 769 void GraphicsLayerChromium::notifyAnimationFinished(double)
768 { 770 {
769 // Do nothing. 771 // Do nothing.
770 } 772 }
771 773
772 } // namespace WebCore 774 } // namespace WebCore
773 775
774 #endif // USE(ACCELERATED_COMPOSITING) 776 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « WebCore/WebCore.gypi ('k') | WebCore/platform/graphics/chromium/ImageLayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698