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

Side by Side Diff: android_webview/common/renderer_picture_map.cc

Issue 16796002: Delete the browser-compositor webview render mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
OLDNEW
(Empty)
1 // Copyright (c) 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 #include "android_webview/common/renderer_picture_map.h"
6
7 #include "base/logging.h"
8
9 using base::AutoLock;
10
11 namespace android_webview {
12
13 static RendererPictureMap* g_renderer_picture_map = NULL;
14
15 // static
16 void RendererPictureMap::CreateInstance() {
17 if (!g_renderer_picture_map)
18 g_renderer_picture_map = new RendererPictureMap();
19 }
20
21 // static
22 RendererPictureMap* RendererPictureMap::GetInstance() {
23 DCHECK(g_renderer_picture_map);
24 return g_renderer_picture_map;
25 }
26
27 RendererPictureMap::RendererPictureMap() {
28 }
29
30 RendererPictureMap::~RendererPictureMap() {
31 }
32
33 skia::RefPtr<SkPicture> RendererPictureMap::GetRendererPicture(int id) {
34 AutoLock lock(lock_);
35 return picture_map_[id];
36 }
37
38 void RendererPictureMap::SetRendererPicture(int id,
39 skia::RefPtr<SkPicture> picture) {
40 AutoLock lock(lock_);
41 picture_map_[id] = picture;
42 }
43
44 void RendererPictureMap::ClearRendererPicture(int id) {
45 AutoLock lock(lock_);
46 picture_map_.erase(id);
47 }
48
49 } // android_webview
OLDNEW
« no previous file with comments | « android_webview/common/renderer_picture_map.h ('k') | android_webview/lib/main/aw_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698