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

Side by Side Diff: ui/gfx/compositor/test/test_texture.cc

Issue 9297041: Merge Compositor and CompositorCC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
« no previous file with comments | « ui/gfx/compositor/test/test_texture.h ('k') | ui/views/widget/native_widget_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 "ui/gfx/compositor/test/test_texture.h"
6
7 #include "third_party/skia/include/core/SkCanvas.h"
8 #include "third_party/skia/include/core/SkDevice.h"
9
10 namespace ui {
11
12 // static
13 int TestTexture::live_count_ = 0;
14
15 TestTexture::TestTexture() {
16 live_count_++;
17 }
18
19 TestTexture::~TestTexture() {
20 live_count_--;
21 }
22
23 void TestTexture::SetCanvas(const SkCanvas& canvas,
24 const gfx::Point& origin,
25 const gfx::Size& overall_size) {
26 const SkBitmap& bitmap = canvas.getDevice()->accessBitmap(false);
27 bounds_of_last_paint_.SetRect(
28 origin.x(), origin.y(), bitmap.width(), bitmap.height());
29 }
30
31 void TestTexture::Draw(const ui::TextureDrawParams& params,
32 const gfx::Rect& clip_bounds) {
33 }
34
35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/compositor/test/test_texture.h ('k') | ui/views/widget/native_widget_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698