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

Side by Side Diff: cc/texture_layer_impl.cc

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector Created 8 years, 1 month 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 | « cc/texture_layer_impl.h ('k') | cc/thread_proxy.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 // 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/texture_layer_impl.h" 7 #include "cc/texture_layer_impl.h"
8 8
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "cc/quad_sink.h" 10 #include "cc/quad_sink.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 void TextureLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQu adsData) 38 void TextureLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQu adsData)
39 { 39 {
40 if (!m_externalTextureResource) 40 if (!m_externalTextureResource)
41 return; 41 return;
42 42
43 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState()); 43 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState());
44 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); 44 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData);
45 45
46 IntRect quadRect(IntPoint(), contentBounds()); 46 gfx::Rect quadRect(gfx::Point(), contentBounds());
47 quadSink.append(TextureDrawQuad::create(sharedQuadState, quadRect, m_externa lTextureResource, m_premultipliedAlpha, m_uvRect, m_flipped).PassAs<DrawQuad>(), appendQuadsData); 47 quadSink.append(TextureDrawQuad::create(sharedQuadState, quadRect, m_externa lTextureResource, m_premultipliedAlpha, m_uvRect, m_flipped).PassAs<DrawQuad>(), appendQuadsData);
48 } 48 }
49 49
50 void TextureLayerImpl::didDraw(ResourceProvider* resourceProvider) 50 void TextureLayerImpl::didDraw(ResourceProvider* resourceProvider)
51 { 51 {
52 if (!m_externalTextureResource) 52 if (!m_externalTextureResource)
53 return; 53 return;
54 // FIXME: the following assert will not be true when sending resources to a 54 // FIXME: the following assert will not be true when sending resources to a
55 // parent compositor. A synchronization scheme (double-buffering or 55 // parent compositor. A synchronization scheme (double-buffering or
56 // pipelining of updates) for the client will need to exist to solve this. 56 // pipelining of updates) for the client will need to exist to solve this.
(...skipping 14 matching lines...) Expand all
71 m_textureId = 0; 71 m_textureId = 0;
72 m_externalTextureResource = 0; 72 m_externalTextureResource = 0;
73 } 73 }
74 74
75 const char* TextureLayerImpl::layerTypeAsString() const 75 const char* TextureLayerImpl::layerTypeAsString() const
76 { 76 {
77 return "TextureLayer"; 77 return "TextureLayer";
78 } 78 }
79 79
80 } 80 }
OLDNEW
« no previous file with comments | « cc/texture_layer_impl.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698