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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp

Issue 7982004: Merge 95506 - [chromium] ContentLayer's texture updater deleted during paint when compositing tur... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 27 matching lines...) Expand all
38 #include "LayerTextureSubImage.h" 38 #include "LayerTextureSubImage.h"
39 #include "LayerTextureUpdater.h" 39 #include "LayerTextureUpdater.h"
40 #include "ManagedTexture.h" 40 #include "ManagedTexture.h"
41 #include "PlatformColor.h" 41 #include "PlatformColor.h"
42 #include "cc/CCLayerImpl.h" 42 #include "cc/CCLayerImpl.h"
43 #include "cc/CCLayerTreeHost.h" 43 #include "cc/CCLayerTreeHost.h"
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 class ImageLayerTextureUpdater : public LayerTextureUpdater { 47 class ImageLayerTextureUpdater : public LayerTextureUpdater {
48 WTF_MAKE_NONCOPYABLE(ImageLayerTextureUpdater);
49 public: 48 public:
50 static PassOwnPtr<ImageLayerTextureUpdater> create(bool useMapTexSubImage) 49 static PassRefPtr<ImageLayerTextureUpdater> create(bool useMapTexSubImage)
51 { 50 {
52 return adoptPtr(new ImageLayerTextureUpdater(useMapTexSubImage)); 51 return adoptRef(new ImageLayerTextureUpdater(useMapTexSubImage));
53 } 52 }
54 53
55 virtual ~ImageLayerTextureUpdater() { } 54 virtual ~ImageLayerTextureUpdater() { }
56 55
57 virtual Orientation orientation() { return LayerTextureUpdater::BottomUpOrie ntation; } 56 virtual Orientation orientation() { return LayerTextureUpdater::BottomUpOrie ntation; }
58 57
59 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat) 58 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat)
60 { 59 {
61 return PlatformColor::sameComponentOrder(textureFormat) ? 60 return PlatformColor::sameComponentOrder(textureFormat) ?
62 LayerTextureUpdater::SampledTexelFormatRGBA : LayerTextureUpdate r::SampledTexelFormatBGRA; 61 LayerTextureUpdater::SampledTexelFormatRGBA : LayerTextureUpdate r::SampledTexelFormatBGRA;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return m_contents && TiledLayerChromium::drawsContent(); 178 return m_contents && TiledLayerChromium::drawsContent();
180 } 179 }
181 180
182 void ImageLayerChromium::createTextureUpdater(const CCLayerTreeHost* host) 181 void ImageLayerChromium::createTextureUpdater(const CCLayerTreeHost* host)
183 { 182 {
184 m_textureUpdater = ImageLayerTextureUpdater::create(host->layerRendererCapab ilities().usingMapSub); 183 m_textureUpdater = ImageLayerTextureUpdater::create(host->layerRendererCapab ilities().usingMapSub);
185 } 184 }
186 185
187 } 186 }
188 #endif // USE(ACCELERATED_COMPOSITING) 187 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698