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

Side by Side Diff: chrome/browser/renderer_host/backing_store_posix.cc

Issue 19491: POSIX: bitmap data on the wire (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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) 2006-2008 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 "chrome/browser/renderer_host/backing_store.h"
6
7 BackingStore::BackingStore(const gfx::Size& size)
8 : size_(size) {
9 if (!canvas_.initialize(size.width(), size.height(), true))
10 SK_CRASH();
11 }
12
13 BackingStore::~BackingStore() {
14 }
15
16 bool BackingStore::PaintRect(base::ProcessHandle process,
17 BitmapWireData bitmap,
18 const gfx::Rect& bitmap_rect) {
19 if (bitmap.width() != bitmap_rect.width() ||
20 bitmap.height() != bitmap_rect.height() ||
21 bitmap.config() != SkBitmap::kARGB_8888_Config) {
22 return false;
23 }
24
25 canvas_.drawBitmap(bitmap, bitmap_rect.x(), bitmap_rect.y());
26 return true;
27 }
28
29 void BackingStore::ScrollRect(base::ProcessHandle process,
30 BitmapWireData bitmap,
31 const gfx::Rect& bitmap_rect,
32 int dx, int dy,
33 const gfx::Rect& clip_rect,
34 const gfx::Size& view_size) {
35 // TODO(port): implement scrolling
36 NOTIMPLEMENTED();
37 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/backing_store.cc ('k') | chrome/browser/renderer_host/backing_store_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698