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

Side by Side Diff: cc/caching_bitmap_canvas_layer_texture_updater.h

Issue 11044003: Reduce texture uploads during scrollbar invalidations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. 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
OLDNEW
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CACHING_BITMAP_CANVAS_LAYER_TEXTURE_UPDATER_H_
tfarina 2012/10/02 21:58:29 CC_CACHING_BITMAP_CANVAS_LAYER_TEXTURE_UPDATER_H_
6 #define CACHING_BITMAP_CANVAS_LAYER_TEXTURE_UPDATER_H_
7
8 #include "base/compiler_specific.h"
9 #include "BitmapCanvasLayerTextureUpdater.h"
10
11 namespace cc {
12
13 class CachingBitmapCanvasLayerTextureUpdater
14 : public BitmapCanvasLayerTextureUpdater {
15 public:
16 static PassRefPtr<CachingBitmapCanvasLayerTextureUpdater> Create(
17 PassOwnPtr<LayerPainterChromium>);
18
19 virtual void prepareToUpdate(const IntRect& content_rect,
20 const IntSize& tile_size,
21 float contents_width_scale,
22 float contents_height_scale,
23 IntRect& resulting_opaque_rect,
24 CCRenderingStats&) OVERRIDE;
25
26 virtual void updateTextureRect(CCResourceProvider*,
27 CCPrioritizedTexture*,
28 const IntRect& source_rect,
29 const IntSize& dest_offset) OVERRIDE;
30
31 private:
32 CachingBitmapCanvasLayerTextureUpdater(
33 PassOwnPtr<LayerPainterChromium> painter);
tfarina 2012/10/02 21:58:29 can you go with scoped_ptr instead of PassOwnPtr?
34
35 bool texture_needs_upload_;
36 SkBitmap cached_bitmap_;
37 };
tfarina 2012/10/02 21:58:29 DISALLOW_?
38
39 } // namespace cc
40
41 #endif // CACHINGBITMAPCANVASLAYERTEXTUREUPDATER_H_
tfarina 2012/10/02 21:58:29 CC_CACHING_BITMAP_CANVAS_LAYER_TEXTURE_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698