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

Side by Side Diff: cc/frame_buffer_skpicture_canvas_layer_texture_updater.cc

Issue 11144023: cc: Store tiles, painters, tiling data in scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 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 | « cc/frame_buffer_skpicture_canvas_layer_texture_updater.h ('k') | cc/layer_tiling_data.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 5
6 #include "config.h" 6 #include "config.h"
7 7
8 #include "FrameBufferSkPictureCanvasLayerTextureUpdater.h" 8 #include "FrameBufferSkPictureCanvasLayerTextureUpdater.h"
9 9
10 #include "LayerPainterChromium.h" 10 #include "LayerPainterChromium.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture(FrameBufferSkPic tureCanvasLayerTextureUpdater* textureUpdater, scoped_ptr<CCPrioritizedTexture> texture) 14 FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture(FrameBufferSkPic tureCanvasLayerTextureUpdater* textureUpdater, scoped_ptr<CCPrioritizedTexture> texture)
15 : LayerTextureUpdater::Texture(texture.Pass()) 15 : LayerTextureUpdater::Texture(texture.Pass())
16 , m_textureUpdater(textureUpdater) 16 , m_textureUpdater(textureUpdater)
17 { 17 {
18 } 18 }
19 19
20 FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::~Texture() 20 FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::~Texture()
21 { 21 {
22 } 22 }
23 23
24 void FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::update(CCTextureUpd ateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool part ialUpdate, CCRenderingStats&) 24 void FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::update(CCTextureUpd ateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool part ialUpdate, CCRenderingStats&)
25 { 25 {
26 textureUpdater()->updateTexture(queue, texture(), sourceRect, destOffset, pa rtialUpdate); 26 textureUpdater()->updateTexture(queue, texture(), sourceRect, destOffset, pa rtialUpdate);
27 } 27 }
28 28
29 PassRefPtr<FrameBufferSkPictureCanvasLayerTextureUpdater> FrameBufferSkPictureCa nvasLayerTextureUpdater::create(PassOwnPtr<LayerPainterChromium> painter) 29 PassRefPtr<FrameBufferSkPictureCanvasLayerTextureUpdater> FrameBufferSkPictureCa nvasLayerTextureUpdater::create(scoped_ptr<LayerPainterChromium> painter)
30 { 30 {
31 return adoptRef(new FrameBufferSkPictureCanvasLayerTextureUpdater(painter)); 31 return adoptRef(new FrameBufferSkPictureCanvasLayerTextureUpdater(painter.Pa ss()));
32 } 32 }
33 33
34 FrameBufferSkPictureCanvasLayerTextureUpdater::FrameBufferSkPictureCanvasLayerTe xtureUpdater(PassOwnPtr<LayerPainterChromium> painter) 34 FrameBufferSkPictureCanvasLayerTextureUpdater::FrameBufferSkPictureCanvasLayerTe xtureUpdater(scoped_ptr<LayerPainterChromium> painter)
35 : SkPictureCanvasLayerTextureUpdater(painter) 35 : SkPictureCanvasLayerTextureUpdater(painter.Pass())
36 { 36 {
37 } 37 }
38 38
39 FrameBufferSkPictureCanvasLayerTextureUpdater::~FrameBufferSkPictureCanvasLayerT extureUpdater() 39 FrameBufferSkPictureCanvasLayerTextureUpdater::~FrameBufferSkPictureCanvasLayerT extureUpdater()
40 { 40 {
41 } 41 }
42 42
43 PassOwnPtr<LayerTextureUpdater::Texture> FrameBufferSkPictureCanvasLayerTextureU pdater::createTexture(CCPrioritizedTextureManager* manager) 43 PassOwnPtr<LayerTextureUpdater::Texture> FrameBufferSkPictureCanvasLayerTextureU pdater::createTexture(CCPrioritizedTextureManager* manager)
44 { 44 {
45 return adoptPtr(new Texture(this, CCPrioritizedTexture::create(manager))); 45 return adoptPtr(new Texture(this, CCPrioritizedTexture::create(manager)));
46 } 46 }
47 47
48 LayerTextureUpdater::SampledTexelFormat FrameBufferSkPictureCanvasLayerTextureUp dater::sampledTexelFormat(GC3Denum textureFormat) 48 LayerTextureUpdater::SampledTexelFormat FrameBufferSkPictureCanvasLayerTextureUp dater::sampledTexelFormat(GC3Denum textureFormat)
49 { 49 {
50 // Here we directly render to the texture, so the component order is always correct. 50 // Here we directly render to the texture, so the component order is always correct.
51 return LayerTextureUpdater::SampledTexelFormatRGBA; 51 return LayerTextureUpdater::SampledTexelFormatRGBA;
52 } 52 }
53 53
54 } // namespace cc 54 } // namespace cc
OLDNEW
« no previous file with comments | « cc/frame_buffer_skpicture_canvas_layer_texture_updater.h ('k') | cc/layer_tiling_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698