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

Side by Side Diff: cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp

Issue 10914268: Change cc files from namespace WebCore to cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/BitmapSkPictureCanvasLayerTextureUpdater.h ('k') | cc/CCActiveAnimation.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 #if USE(ACCELERATED_COMPOSITING) 8 #if USE(ACCELERATED_COMPOSITING)
9 9
10 #include "BitmapSkPictureCanvasLayerTextureUpdater.h" 10 #include "BitmapSkPictureCanvasLayerTextureUpdater.h"
11 11
12 #include "CCRenderingStats.h" 12 #include "CCRenderingStats.h"
13 #include "LayerPainterChromium.h" 13 #include "LayerPainterChromium.h"
14 #include "PlatformColor.h" 14 #include "PlatformColor.h"
15 #include "SkCanvas.h" 15 #include "SkCanvas.h"
16 #include "SkDevice.h" 16 #include "SkDevice.h"
17 #include <wtf/CurrentTime.h> 17 #include <wtf/CurrentTime.h>
18 18
19 namespace WebCore { 19 namespace cc {
20 20
21 BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture(BitmapSkPictureCanvas LayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture) 21 BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture(BitmapSkPictureCanvas LayerTextureUpdater* textureUpdater, PassOwnPtr<CCPrioritizedTexture> texture)
22 : CanvasLayerTextureUpdater::Texture(texture) 22 : CanvasLayerTextureUpdater::Texture(texture)
23 , m_textureUpdater(textureUpdater) 23 , m_textureUpdater(textureUpdater)
24 { 24 {
25 } 25 }
26 26
27 void BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect(const IntRec t& sourceRect, CCRenderingStats& stats) 27 void BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect(const IntRec t& sourceRect, CCRenderingStats& stats)
28 { 28 {
29 m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, sourceRect.width(), sourceRe ct.height()); 29 m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, sourceRect.width(), sourceRe ct.height());
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect(SkCanvas* canva s, const IntRect& sourceRect, CCRenderingStats& stats) 73 void BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect(SkCanvas* canva s, const IntRect& sourceRect, CCRenderingStats& stats)
74 { 74 {
75 // Translate the origin of contentRect to that of sourceRect. 75 // Translate the origin of contentRect to that of sourceRect.
76 canvas->translate(contentRect().x() - sourceRect.x(), 76 canvas->translate(contentRect().x() - sourceRect.x(),
77 contentRect().y() - sourceRect.y()); 77 contentRect().y() - sourceRect.y());
78 double rasterizeBeginTime = monotonicallyIncreasingTime(); 78 double rasterizeBeginTime = monotonicallyIncreasingTime();
79 drawPicture(canvas); 79 drawPicture(canvas);
80 stats.totalRasterizeTimeInSeconds += monotonicallyIncreasingTime() - rasteri zeBeginTime; 80 stats.totalRasterizeTimeInSeconds += monotonicallyIncreasingTime() - rasteri zeBeginTime;
81 } 81 }
82 82
83 } // namespace WebCore 83 } // namespace cc
84 #endif // USE(ACCELERATED_COMPOSITING) 84 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/BitmapSkPictureCanvasLayerTextureUpdater.h ('k') | cc/CCActiveAnimation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698