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

Side by Side Diff: views/aura_desktop/aura_desktop_main.cc

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE { 49 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE {
50 return true; 50 return true;
51 } 51 }
52 virtual bool ShouldActivate(aura::MouseEvent* event) OVERRIDE { 52 virtual bool ShouldActivate(aura::MouseEvent* event) OVERRIDE {
53 return true; 53 return true;
54 } 54 }
55 virtual void OnActivated() OVERRIDE {} 55 virtual void OnActivated() OVERRIDE {}
56 virtual void OnLostActive() OVERRIDE {} 56 virtual void OnLostActive() OVERRIDE {}
57 virtual void OnCaptureLost() OVERRIDE {} 57 virtual void OnCaptureLost() OVERRIDE {}
58 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 58 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
59 canvas->AsCanvasSkia()->drawColor(color_, SkXfermode::kSrc_Mode); 59 canvas->GetSkCanvas()->drawColor(color_, SkXfermode::kSrc_Mode);
60 } 60 }
61 virtual void OnWindowDestroying() OVERRIDE { 61 virtual void OnWindowDestroying() OVERRIDE {
62 } 62 }
63 virtual void OnWindowDestroyed() OVERRIDE { 63 virtual void OnWindowDestroyed() OVERRIDE {
64 } 64 }
65 65
66 private: 66 private:
67 SkColor color_; 67 SkColor color_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(DemoWindowDelegate); 69 DISALLOW_COPY_AND_ASSIGN(DemoWindowDelegate);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 contents, window2, gfx::Rect(120, 150, 200, 200)); 181 contents, window2, gfx::Rect(120, 150, 200, 200));
182 views_window->Show(); 182 views_window->Show();
183 183
184 aura::Desktop::GetInstance()->Run(); 184 aura::Desktop::GetInstance()->Run();
185 185
186 delete aura::Desktop::GetInstance(); 186 delete aura::Desktop::GetInstance();
187 187
188 return 0; 188 return 0;
189 } 189 }
190 190
OLDNEW
« ui/gfx/canvas.h ('K') | « ui/gfx/render_text_win.cc ('k') | views/background.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698