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

Side by Side Diff: cc/resources/resource_update.cc

Issue 16069004: cc: Remove legacy accelerated painting path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unused variable warning Created 7 years, 6 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/resources/resource_update.h ('k') | cc/resources/resource_update_controller.cc » ('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 2012 The Chromium Authors. All rights reserved. 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 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 "cc/resources/resource_update.h" 5 #include "cc/resources/resource_update.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "skia/ext/platform_canvas.h" 8 #include "third_party/skia/include/core/SkCanvas.h"
9 #include "third_party/skia/include/core/SkDevice.h"
9 10
10 namespace cc { 11 namespace cc {
11 12
12 ResourceUpdate ResourceUpdate::Create(PrioritizedResource* texture, 13 ResourceUpdate ResourceUpdate::Create(PrioritizedResource* texture,
13 const SkBitmap* bitmap, 14 const SkBitmap* bitmap,
14 gfx::Rect content_rect, 15 gfx::Rect content_rect,
15 gfx::Rect source_rect, 16 gfx::Rect source_rect,
16 gfx::Vector2d dest_offset) { 17 gfx::Vector2d dest_offset) {
17 CHECK(content_rect.Contains(source_rect)); 18 CHECK(content_rect.Contains(source_rect));
18 ResourceUpdate update; 19 ResourceUpdate update;
(...skipping 15 matching lines...) Expand all
34 ResourceUpdate update; 35 ResourceUpdate update;
35 update.texture = resource; 36 update.texture = resource;
36 update.canvas = canvas; 37 update.canvas = canvas;
37 update.bitmap = &canvas->getDevice()->accessBitmap(false); 38 update.bitmap = &canvas->getDevice()->accessBitmap(false);
38 update.content_rect = content_rect; 39 update.content_rect = content_rect;
39 update.source_rect = source_rect; 40 update.source_rect = source_rect;
40 update.dest_offset = dest_offset; 41 update.dest_offset = dest_offset;
41 return update; 42 return update;
42 } 43 }
43 44
44 ResourceUpdate ResourceUpdate::CreateFromPicture(PrioritizedResource* texture,
45 SkPicture* picture,
46 gfx::Rect content_rect,
47 gfx::Rect source_rect,
48 gfx::Vector2d dest_offset) {
49 CHECK(content_rect.Contains(source_rect));
50 ResourceUpdate update;
51 update.texture = texture;
52 update.picture = picture;
53 update.content_rect = content_rect;
54 update.source_rect = source_rect;
55 update.dest_offset = dest_offset;
56 return update;
57 }
58
59 ResourceUpdate::ResourceUpdate() 45 ResourceUpdate::ResourceUpdate()
60 : texture(NULL), 46 : texture(NULL),
61 bitmap(NULL), 47 bitmap(NULL) {}
62 picture(NULL) {}
63 48
64 ResourceUpdate::~ResourceUpdate() {} 49 ResourceUpdate::~ResourceUpdate() {}
65 50
66 } // namespace cc 51 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_update.h ('k') | cc/resources/resource_update_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698