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

Side by Side Diff: ui/gfx/canvas_skia.cc

Issue 7741027: Create a new views_aura_desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | « aura/window_delegate.h ('k') | ui/gfx/screen_aura.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 (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 "ui/gfx/canvas_skia.h" 5 #include "ui/gfx/canvas_skia.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 // Canvas, public: 359 // Canvas, public:
360 360
361 Canvas* Canvas::CreateCanvas() { 361 Canvas* Canvas::CreateCanvas() {
362 return new CanvasSkia; 362 return new CanvasSkia;
363 } 363 }
364 364
365 Canvas* Canvas::CreateCanvas(int width, int height, bool is_opaque) { 365 Canvas* Canvas::CreateCanvas(int width, int height, bool is_opaque) {
366 return new CanvasSkia(width, height, is_opaque); 366 return new CanvasSkia(width, height, is_opaque);
367 } 367 }
368 368
369 #if defined(OS_WIN) 369 #if defined(OS_WIN) && !defined(USE_AURA)
370 // TODO(beng): move to canvas_win.cc, etc. 370 // TODO(beng): move to canvas_win.cc, etc.
371 class CanvasPaintWin : public CanvasSkiaPaint, public CanvasPaint { 371 class CanvasPaintWin : public CanvasSkiaPaint, public CanvasPaint {
372 public: 372 public:
373 CanvasPaintWin(gfx::NativeView view) : CanvasSkiaPaint(view) {} 373 CanvasPaintWin(gfx::NativeView view) : CanvasSkiaPaint(view) {}
374 374
375 // Overridden from CanvasPaint2: 375 // Overridden from CanvasPaint2:
376 virtual bool IsValid() const { 376 virtual bool IsValid() const {
377 return isEmpty(); 377 return isEmpty();
378 } 378 }
379 379
380 virtual gfx::Rect GetInvalidRect() const { 380 virtual gfx::Rect GetInvalidRect() const {
381 return gfx::Rect(paintStruct().rcPaint); 381 return gfx::Rect(paintStruct().rcPaint);
382 } 382 }
383 383
384 virtual Canvas* AsCanvas() { 384 virtual Canvas* AsCanvas() {
385 return this; 385 return this;
386 } 386 }
387 }; 387 };
388 #endif 388 #endif
389 389
390 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { 390 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) {
391 #if defined(OS_WIN) 391 #if defined(OS_WIN) && !defined(USE_AURA)
392 return new CanvasPaintWin(view); 392 return new CanvasPaintWin(view);
393 #else 393 #else
394 return NULL; 394 return NULL;
395 #endif 395 #endif
396 } 396 }
397 397
398 } // namespace gfx 398 } // namespace gfx
OLDNEW
« no previous file with comments | « aura/window_delegate.h ('k') | ui/gfx/screen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698