diff options
author | reveman@google.com <reveman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 19:51:31 +0000 |
---|---|---|
committer | reveman@google.com <reveman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 19:51:31 +0000 |
commit | fdc76934e9e3625f5a14b874dca7d2e77bc1cee9 (patch) | |
tree | 9cb2e6299ac8b81aa6b3da5c529de680d13e3201 /cc/image_layer.cc | |
parent | 240976d09448569961b2d04920e510b30aa62a4f (diff) | |
download | chromium_src-fdc76934e9e3625f5a14b874dca7d2e77bc1cee9.zip chromium_src-fdc76934e9e3625f5a14b874dca7d2e77bc1cee9.tar.gz chromium_src-fdc76934e9e3625f5a14b874dca7d2e77bc1cee9.tar.bz2 |
cc: Move contentsSwizzled property from LayerTextureUpdater to CCPrioritizedTexture class.
The contentsSwizzled property is true when we upload BGRA contents to
a RGBA texture. Instead of having the LayerTextureUpdater (which is
not responsible for texture uploads) determine the value of this property
set it in CCPrioritizedTexture::upload() when an upload takes place.
This will also allow us to remove the
FrameBufferSkPictureCanvasLayerTextureUpdater class, which currently
only exists so contentsSwizzled is set correctly.
BUG=
TEST=manual
Review URL: https://codereview.chromium.org/11232028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163347 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/image_layer.cc')
-rw-r--r-- | cc/image_layer.cc | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/cc/image_layer.cc b/cc/image_layer.cc index 2ddc4f8..7352328 100644 --- a/cc/image_layer.cc +++ b/cc/image_layer.cc @@ -9,7 +9,6 @@ #include "CCLayerTreeHost.h" #include "base/compiler_specific.h" #include "cc/layer_texture_updater.h" -#include "cc/platform_color.h" #include "cc/texture_update_queue.h" namespace cc { @@ -46,12 +45,6 @@ public: return scoped_ptr<LayerTextureUpdater::Texture>(new Texture(this, CCPrioritizedTexture::create(manager))); } - virtual SampledTexelFormat sampledTexelFormat(GLenum textureFormat) OVERRIDE - { - return PlatformColor::sameComponentOrder(textureFormat) ? - LayerTextureUpdater::SampledTexelFormatRGBA : LayerTextureUpdater::SampledTexelFormatBGRA; - } - void updateTexture(CCTextureUpdateQueue& queue, CCPrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate) { // Source rect should never go outside the image pixels, even if this @@ -140,7 +133,6 @@ void ImageLayerChromium::createTextureUpdaterIfNeeded() m_textureUpdater = ImageLayerTextureUpdater::create(); GLenum textureFormat = layerTreeHost()->rendererCapabilities().bestTextureFormat; setTextureFormat(textureFormat); - setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat)); } LayerTextureUpdater* ImageLayerChromium::textureUpdater() const |