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

Side by Side Diff: webkit/compositor_bindings/web_external_texture_layer_impl.cc

Issue 11783094: cc: Add point-based UV coordinate on TextureLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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 | « ui/gfx/size_base_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h" 5 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h"
6 6
7 #include "cc/resource_update_queue.h" 7 #include "cc/resource_update_queue.h"
8 #include "cc/texture_layer.h" 8 #include "cc/texture_layer.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayerClient.h" 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayerClient.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 static_cast<TextureLayer*>(m_layer->layer())->setTextureId(id); 42 static_cast<TextureLayer*>(m_layer->layer())->setTextureId(id);
43 } 43 }
44 44
45 void WebExternalTextureLayerImpl::setFlipped(bool flipped) 45 void WebExternalTextureLayerImpl::setFlipped(bool flipped)
46 { 46 {
47 static_cast<TextureLayer*>(m_layer->layer())->setFlipped(flipped); 47 static_cast<TextureLayer*>(m_layer->layer())->setFlipped(flipped);
48 } 48 }
49 49
50 void WebExternalTextureLayerImpl::setUVRect(const WebFloatRect& rect) 50 void WebExternalTextureLayerImpl::setUVRect(const WebFloatRect& rect)
51 { 51 {
52 static_cast<TextureLayer*>(m_layer->layer())->setUVRect(rect); 52 static_cast<TextureLayer*>(m_layer->layer())->setUV(gfx::PointF(rect.x, rect .y), gfx::PointF(rect.x + rect.width, rect.y + rect.height));
53 } 53 }
54 54
55 void WebExternalTextureLayerImpl::setOpaque(bool opaque) 55 void WebExternalTextureLayerImpl::setOpaque(bool opaque)
56 { 56 {
57 static_cast<TextureLayer*>(m_layer->layer())->setContentsOpaque(opaque); 57 static_cast<TextureLayer*>(m_layer->layer())->setContentsOpaque(opaque);
58 } 58 }
59 59
60 void WebExternalTextureLayerImpl::setPremultipliedAlpha(bool premultipliedAlpha) 60 void WebExternalTextureLayerImpl::setPremultipliedAlpha(bool premultipliedAlpha)
61 { 61 {
62 static_cast<TextureLayer*>(m_layer->layer())->setPremultipliedAlpha(premulti pliedAlpha); 62 static_cast<TextureLayer*>(m_layer->layer())->setPremultipliedAlpha(premulti pliedAlpha);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return m_client->prepareTexture(updaterImpl); 96 return m_client->prepareTexture(updaterImpl);
97 } 97 }
98 98
99 WebGraphicsContext3D* WebExternalTextureLayerImpl::context() 99 WebGraphicsContext3D* WebExternalTextureLayerImpl::context()
100 { 100 {
101 DCHECK(m_client); 101 DCHECK(m_client);
102 return m_client->context(); 102 return m_client->context();
103 } 103 }
104 104
105 } // namespace WebKit 105 } // namespace WebKit
OLDNEW
« no previous file with comments | « ui/gfx/size_base_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698